- 3
- 0
- 约5.96千字
- 约 7页
- 2024-06-28 发布于上海
- 举报
WinsockClientSourceCode
#defineWIN32_LEAN_AND_MEAN#includewindows.h
#includewinsock2.h#includews2tcpip.h#includestdlib.h#includestdio.h
//NeedtolinkwithWs2_32.lib,Mswsock.lib,andAdvapi32.lib#pragmacomment(lib,Ws2_32.lib)
#pragmacomment(lib,Mswsock.lib)#pragmacomment(lib,AdvApi32.lib)
#defineDEFAULT_BUFLEN512
#defineDEFAULT_PORT27015
intcdeclmain(intargc,char**argv)
{
WSADATAwsaData;
SOCKETConnectSocket=INVALID_SOCKET;structaddrinfo*result=NULL,
*ptr=NULL,hints;
char*sendbuf=thisisatest;charrecvbuf[DEFAULT_BUFLEN];intiResult;
intre
您可能关注的文档
- unit 3 This is my father分析和总结分析和总结.docx
- unit 3词组分析和总结.docx
- unit 4 Cyberspace学案分析和总结.docx
- Unit 4 Earthquakes分析和总结分析和总结.docx
- Unit 4分析和总结分析和总结.docx
- Unit 5 Can you come to my party分析和总结分析和总结.docx
- Unit 5 Grammar 分析和总结分析和总结.docx
- Unit 5 Music分析和总结分析和总结.docx
- Unit 5 Nelson Mandela分析和总结分析和总结.docx
- Unit 5单元测试题分析和总结.docx
原创力文档

文档评论(0)