Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Socket-Programming/TCP/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ int main()
struct sockaddr_in serveraddr,clientaddr; //creating a structure of type sockaddr_in for server
socklen_t len; //creating a variable to store the length of the server address
char message[50]; //
struct serveraddr; //creating a structure of type sockaddr_in for server



serversocket=socket(AF_INET,SOCK_STREAM,0); //creating a socket
bzero((char*)&serveraddr,sizeof(serveraddr));//initializing the server address to zero
serveraddr.sin_family=AF_INET;//setting the family of the server address to AF_INET
Expand Down Expand Up @@ -68,4 +66,4 @@ Reading message from the client.
The client has sent.HI,IAM CLIENT...
Sending message to the client.
s6d2@user-HP-280-G3-MT:~/Networking-Lab-S6/Socket-Programming/TCP$ ^C
*/
*/