send The Windows Sockets send function sends data on a connected socket.int send ( SOCKET s, const char FAR * buf, int len, int flags ); 参数都检查看看,如果是服务器端,检查socket是否是accept之后新的socket
int send ( SOCKET s, //如果是客户端 是连接建立的新套接字 const char FAR * buf, //发送数据的缓冲区 int len, //发送的大小 int flags // );有错WSAGetLastErrorThe Windows Sockets WSAGetLastError function gets the error status for the last operation that failed. 用这个函数获取 int WSAGetLastError (void); Parameters This function has no parameters.Return Values The return value indicates the error code for this thread's last Windows Sockets operation that failed.建议楼主给出源码
The Windows Sockets send function sends data on a connected socket.int send (
SOCKET s,
const char FAR * buf,
int len,
int flags
);
参数都检查看看,如果是服务器端,检查socket是否是accept之后新的socket
SOCKET s, //如果是客户端 是连接建立的新套接字
const char FAR * buf, //发送数据的缓冲区
int len, //发送的大小
int flags //
);有错WSAGetLastErrorThe Windows Sockets WSAGetLastError function gets the error status for the last operation that failed.
用这个函数获取
int WSAGetLastError (void);
Parameters
This function has no parameters.Return Values
The return value indicates the error code for this
thread's last Windows Sockets operation that failed.建议楼主给出源码
源码在这个链接里:http://topic.csdn.net/u/20110925/22/d46e9234-40e5-4928-9e94-d6bf6471b566.html