پاورپوینت کامل Socket Programming 39 اسلاید در PowerPoint


در حال بارگذاری
10 جولای 2025
پاورپوینت
17870
4 بازدید
۷۹,۷۰۰ تومان
خرید

توجه : این فایل به صورت فایل power point (پاور پوینت) ارائه میگردد

 پاورپوینت کامل Socket Programming 39 اسلاید در PowerPoint دارای ۳۹ اسلاید می باشد و دارای تنظیمات کامل در PowerPoint می باشد و آماده ارائه یا چاپ است

شما با استفاده ازاین پاورپوینت میتوانید یک ارائه بسیارعالی و با شکوهی داشته باشید و همه حاضرین با اشتیاق به مطالب شما گوش خواهند داد.

لطفا نگران مطالب داخل پاورپوینت نباشید، مطالب داخل اسلاید ها بسیار ساده و قابل درک برای شما می باشد، ما عالی بودن این فایل رو تضمین می کنیم.

توجه : در صورت  مشاهده  بهم ریختگی احتمالی در متون زیر ،دلیل ان کپی کردن این مطالب از داخل فایل می باشد و در فایل اصلی پاورپوینت کامل Socket Programming 39 اسلاید در PowerPoint،به هیچ وجه بهم ریختگی وجود ندارد


بخشی از مطالب داخلی اسلاید ها

پاورپوینت کامل Socket Programming 39 اسلاید در PowerPoint

اسلاید ۴: Introduction to SocketsWhy SocketsUsed for Interprocess communication.The Client-Server modelMost interprocess communication uses client-server modelClient & Server are two processes that wants to communicate with each otherThe Client process connects to the Server process, to make a request for information/services own by the Server.Once the connection is established between Client process and Server process, they can start sending / receiving information.What are SocketsEnd-point of interprocess communication.An interface through which processes can send / receive informationSocket

اسلاید ۵: Introduction to SocketsWhat exactly creates a Socket<IP address, Port #> tupleWhat makes a connection{Source<IP address, Port #> , Destination <IP address, Port #>} i.e. source socket – destination socket pair uniquely identifies a connection.ExampleServerClientClient192.168.0.1192.168.0.2192.168.0.28013435488Client192.168.0.31343

اسلاید ۶: Introduction to SocketsSocket TypesSTREAM – uses TCP which is reliable, stream oriented protocolDATAGRAM – uses UDP which is unreliable, message oriented protocolRAW – provides RAW data transfer directly over IP protocol (no transport layer)Sockets can use “unicast” ( for a particular IP address destination)“multicast” ( a set of destinations – ۲۲۴.x.x.x)“broadcast” (direct and limited)“Loopback” address i.e. 127.x.x.x

اسلاید ۷: A generic Client-Server application

اسلاید ۸: A generic TCP applicationalgorithm for TCP clientFind the IP address and port number of serverCreate a TCP socketConnect the socket to server (Server must be up and listening for new requests)Send/ receive data with server using the socketClose the connection algorithm for TCP serverFind the IP address and port number of serverCreate a TCP server socketBind the server socket to server IP and Port number (this is the port to which clients will connect)Accept a new connection from client returns a client socket that represents the client which is connectedSend/ receive data with client using the client socketClose the connection with client

اسلاید ۹: A generic UDP applicationalgorithm for UDP clientFind the IP address and port number of serverCreate a UDP socketSend/ receive data with server using the socketClose the connection algorithm for UDP serverFind the IP address and port number of serverCreate a UDP server socketBind the server socket to server IP and Port number (this is the port to which clients will send)Send/ receive data with client using the client socketClose the connection with client

اسلاید ۱۰: Programming Client-Server in C

اسلاید ۱۱: Programming Client-Server in CThe steps involved in establishing a socket on the client side are as follows: Create a socket with the socket() system call Connect the socket to the address of the server using the connect() system call Send and receive data using send() and recv() system calls. The steps involved in establishing a socket on the server side are as follows: Create a socket with the socket() system call Bind the socket to an address using the bind() system call. For a server socket on the Internet, an address consists of a port number on the host machine. Listen for connections with the listen() system call Accept a connection with the accept() system call. This call typically blocks until a client connects with the server. Send and receive data

اسلاید ۱۲: Programming TCP Client in C#include <stdio.h>#include <sys/types.h>#include <sys/socket.h>#include <netinet/in.h>#include <netdb.h> void error(char *msg){ perror(msg); exit(0);}int main(int argc, char *argv[]){ int sockfd, portno, n; struct sockaddr_in serv_addr; struct hostent *server; char buffer[256]; if (argc < 3) { fprintf(stderr,usage %s hostname portn, argv[0]); exit(0); } portno = atoi(argv[2]); sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sockfd < 0) error(ERROR opening socket); /* a structure to contain an internet address defined in the include file <netinet/in.h> */struct sockaddr_in { short sin_family; /* should be AF_INET */ u_short sin_port; struct in_addr sin_addr; char sin_zero[8]; /* not used, must be zero */};struct in_addr { unsigned long s_addr;}; Client.c

اسلاید ۱۳: Programming TCP Client in C#include <stdio.h>#include <sys/types.h>#include <sys/socket.h>#include <netinet/in.h>#include <netdb.h> void error(char *msg){ perror(msg); exit(0);}int main(int argc, char *argv[]){ int sockfd, portno, n; struct sockaddr_in serv_addr; struct hostent *server; char buffer[256]; if (argc < 3) { fprintf(stderr,usage %s hostname portn, argv[0]); exit(0); } portno = atoi(argv[2]); sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sockfd < 0) error(ERROR opening socket); Client.cSocket System Call – create an end point for communication#include <sys/types.h>#include <sys/socket.h>int socket(int domain, int type, int protocol);Returns a descriptordomain: selects protocol family e.g. PF_IPX, PF_X25, PF_APPLETALKtype: specifies communication semantics e.g. SOCK_DGRAM, SOCK_RAWprotocol: specifies a particular protocol to be used e.g. IPPROTO_UDP, IPPROTO_ICMP

اسلاید ۱۴: Programming TCP Client in Cserver = gethostbyname(argv[1]); if (server == NULL) { fprintf(stderr,ERROR, no such hostn); exit(0); } bzero((char *) &serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; bcopy((char *)server->h_addr, (char *)&serv_addr.sin_addr.s_addr, server->h_length); serv_addr.sin_port = htons(portno); if (connect(sockfd,&serv_addr,sizeof(serv_addr)) < 0) error(ERROR connecting); printf(Please enter the message: ); bzero(buffer,256); fgets(buffer,255,stdin); n = send(sockfd,buffer,strlen(buffer),0); if (n < 0) error(ERROR writing to socket); bzero(buffer,256); n = recv(sockfd,buffer,255,0); if (n < 0) error(ERROR reading from socket); printf(%sn,buffer); close(sockfd); return 0;} Client.cConnect System Call – initiates a connection on a socket#include <sys/types.h>#include <sys/socket.h>int connect( int sockfd, const struct sockaddr *serv_addr,socklen_t addrlen);Returns 0 on successsockfd: descriptor that must refer to a socketserv_addr: address to which we want to connectaddrlen: length of serv_addr

اسلاید ۱۵: Programming TCP Client in Cserver = gethostbyname(argv[1]); if (server == NULL) { fprintf(stderr,ERROR, no such hostn); exit(0); } bzero((char *) &serv_addr, sizeof(serv_addr)); serv_addr.sin_family = AF_INET; bcopy((char *)server->h_addr, (char *)&serv_addr.sin_addr.s_addr, server->h_length); serv_addr.sin_port = htons(portno); if (connect(sockfd,&serv_addr,sizeof(serv_addr)) < 0) error(ERROR connecting); printf(Please en

  راهنمای خرید:
  • همچنین لینک دانلود به ایمیل شما ارسال خواهد شد به همین دلیل ایمیل خود را به دقت وارد نمایید.
  • ممکن است ایمیل ارسالی به پوشه اسپم یا Bulk ایمیل شما ارسال شده باشد.
  • در صورتی که به هر دلیلی موفق به دانلود فایل مورد نظر نشدید با ما تماس بگیرید.