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
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.