Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Client and Server are supposed to interact between each other for a simple valdi

ID: 3550268 • Letter: C

Question

Client and Server are supposed to interact between each other for a simple valdiation program, user enter machine id.


Server:

Client:

Server:

Client:

Server:

Client:

Server:

Client:





/// Server.cpp

#include <WinSock2.h>

#include <iostream>

#include <string>

#include <fstream>

#include <cctype>

#include <Windows.h>

using namespace std;


#pragma comment(lib, "Ws2_32.lib")


char filename[] = "data.txt";

const int STRLEN = 256;


int main()

{

int port = 50000;

return 0;

}





//// Client.cpp


#include <WinSock2.h>

#include <iostream>

#include <string>

#include <fstream>

#include <Windows.h>

using namespace std;


#pragma comment(lib, "Ws2_32.lib")


char filename[] = "actFile.txt";

const int STRLEN = 256;


int main()

{

char ipAddress[] = "127.0.0.1";

int port = 50000;

return 0;

Explanation / Answer

Hi,

Here are your programs:

Server.cpp: http://pastebin.com/G10TYHwH

Client.cpp: http://pastebin.com/LtxhDJLy


Let me know if you need any improvement.

Thanks


Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote