Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I want to modify the program codes to run on Visual studio 2017 and get output as per assignment above. Codes are given below. Please
I want to modify the program codes to run on Visual studio 2017 and get output as per assignment above. Codes are given below. Please help me with this.
Serversocket code
#include #include #include #include void error(char *msg) { perror(msg); exit(1); } int main(int argc, char *argv[]) { int sockfd, newsockfd, portno, clilen; char buffer[256]; struct sockaddr_in serv_addr, cli_addr; int n; if (argcClient socket code
#include #include #include #include #include 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 h_addr, (char *)&serv_addr.sin_addr.s_addr, server->h_length); serv_addr.sin_port = htons(portno); if (connect(sockfd,(struct sockaddr *)&serv_addr,sizeof(serv_addr)) CPSC445 NETWORK AND DATA COMM SPRING 2019 Assignment 1 (30) Title: Simple Telnet Program Due Date: Sunday, 02/10/2019 Socket programming is one of the most important part of computer networks that utilize client or server. In this programming project, you are asked to develop a small client-server sockets extensively. In order to communicate with other machines your machine wor application that works like a telnet program. Modify the client-server program on page satisfying the following requirements Server . Need to create a passwd.txt file with the following format: (username, password, full name, major, advisor): . Create at least five users for the passwd.txt: The passwd.txt is on your working directory: . Listen to at least three clients: As for a valid access, the server send messages "Welcome to CPSC445-Comp Networking class" "You are invited to use Your Own Name Machine" . As for an invalid access, the server send messages Only for ESU CPSC Students taking CPSC445" "You are not yet invited yet" Each client can try up to three times for getting a valid access: Client . Each client can telnet a server with the followings Welcome to Computer Science Department" Login: xxxxxxxx "Passwd: wwwwwww" //User name can be up to eight chara //Typed passwd should be repacw You open two more Terminals to provide other clients access to the server Cut and paste your implementation. Turn in your printout in class and upload your sour gram with the passwd.txt to the class Your source D2L
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started