rendered paste body#include "stdhead.h"
#include "flsocket.h"
#include "csocket.h"
/* global data */
#ifdef OS_WIN32
WSADATA wsaData;
#endif
int main(void)
{
string h1;
csocket c1("freechess.org", 5000);
int flag;
#ifdef OS_WIN32
if (WSAStartup(WINSOCK_VERSION, &wsaData))
{
cout << "unable to start WinSock. Program abort\n";
WSACleanup();
return(0);
}
#endif
flag = c1.send_receive("end", h1);
cout << "flag=" << flag << ",h1=" << h1 << ",l=" << h1.length() << '\n';
#ifdef OS_WIN32
WSACleanup();
#endif
return(0);
}