解决方案 »
- SendMessage的两个小问题
- vs08怎么从C#转到C++
- 哪位大侠能提供一个StretchBlt的源码?
- [求助][VC++] 有关 assert() 的错误
- 怎么解决VC++ RUNTIME ERROR ??
- 如何在编译vc前,执行一个命令,而不是在编译之后或链接之前
- CInternetFile高手请进!
- 关于CTabCtrl的问题?
- 关于Windows句柄,请问窗口的句柄值和其他句柄(比如hBitmap)是否共享同一个句柄值空间?
- 如何解决???????????????函数连接问题
- tcp协议下SOCKET发送SEND十六进制数组问题
- 用ToolHelp32来枚举一个进程的线程,为什么不是在进程中查找,而是要反向匹配?
If no error occurs, send returns the total number of bytes sent, which can be less than the number requested to be sent in the len parameter. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError.// Send an initial buffer
iResult = send( ConnectSocket, sendbuf, (int)strlen(sendbuf), 0 );
if (iResult == SOCKET_ERROR) {
printf("send() failed with error: %d\n", WSAGetLastError());
closesocket(ConnectSocket);
WSACleanup();
return 1;
} printf("Bytes Sent: %d\n", iResult);
长度好像应该是 sizeof(aa)*3 吧
http://www.cnblogs.com/EdmundDwyane/p/3233438.html
查找本机IP,建议使用CxLocalHostIPAddrFind
http://www.cnblogs.com/EdmundDwyane/p/3200494.html
网络通信,建议使用CxClientSocket/CxServerSocket/CxUdpSocket
http://www.cnblogs.com/EdmundDwyane/p/3248297.htmlhttp://www.cnblogs.com/EdmundDwyane/p/3278641.htmlhttp://www.cnblogs.com/EdmundDwyane/p/3218838.html