client and server Demo of socket. client send data to server. server send data to client. // this is client #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <assert.h> #include <stdio.h> #incl…
<Beginning Linux Programming_4th> chapter 15 Sockets 1 A simple local client/server 1) client.c // 1) header files // int socket(int domain, int type, int protocol); #include <sys/types.h> // int connect(int socket, const struct sockaddr*ad…