Experiment 8
Experiment 8
UIN:- 221P011
Eperiment8
TCP Server :
#include <stdio.h>
#include <netdb.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h> // read(), write(), close()
#define MAX 80
#define PORT 8080
#define SA struct sockaddr
TCP Client:
int main()
{
int sockfd, connfd;
struct sockaddr_in servaddr, cli;