各位好,小妹有礼了
m_ClientSocket = accept(m_Receiver->m_rSocket,&soaddr,NULL);
if (m_ClientSocket == INVALID_SOCKET)
{
MessageBox(0,"Error open new sockets","error",MB_OK);//果真弹出了对话框,引起这种无效的SOCKET有那些原因呀?谢了
return 0;
}
问题点数:20、回复次数:6Top
1 楼gigi_andy(小猪)回复于 2002-04-26 16:53:26 得分 0
哎呀,这个这个太多了,多贴点才知道!Top
2 楼vtable9999(肝肝肝肝)回复于 2002-04-26 17:35:43 得分 0
检测错误代码,然后查MSDNTop
3 楼zhuwenzheng(卧薪尝胆)回复于 2002-04-26 17:40:05 得分 0
9494Top
4 楼zhuwenzheng(卧薪尝胆)回复于 2002-04-26 17:40:19 得分 0
9494Top
5 楼ccnuxjg()回复于 2002-04-26 17:44:38 得分 5
GetLastError()后用Error LookUp来查Top
6 楼tianlinyi(笨蛋)回复于 2002-04-26 17:47:31 得分 10
GetLastError()返回最后一次错误及其详细信息再看
static int GetLastError( );
Return Value
The return value indicates the error code for the last Windows Sockets API routine performed by this thread.
Remarks
Call this member function to get the error status for the last operation that failed. When a particular member function indicates that an error has occurred, GetLastError should be called to retrieve the appropriate error code. See the individual member function descriptions for a list of applicable error codes.
Top
7 楼vc8(沧海-巫山)回复于 2002-04-26 17:49:04 得分 5
GetLastErrorTop
8 楼thd111(小蛐蛐)回复于 2002-04-26 17:51:08 得分 0
你也太保守了吧,^_^Top




