我是采用多播的方式,建立连接后在WSASendTO()时发生错误!如下:
int status = WSASendTo (MultiSock, /* socket */
SendBuf, /* output buffer structure */
1, /* buffer count */
cbRet, /* number of bytes sent */
0, /* flags */
(struct sockaddr FAR *)&DestAddr,/* destination address */
sizeof(DestAddr), /* size of addr structure */
NULL, /* overlapped structure */
NULL); /* overlapped callback function */ if (status == SOCKET_ERROR)
{
int mm = WSAGetLastError();
if (mm == WSA_IO_PENDING)
{
AfxMessageBox("重叠操作成功启动!过后将有完成指示");
} AfxMessageBox("WSASendTo() Error");
SendLen = -1;
}
int mm = WSAGetLastError(); 得到的错误号为10014,请高手帮忙,先谢谢了!
int status = WSASendTo (MultiSock, /* socket */
SendBuf, /* output buffer structure */
1, /* buffer count */
cbRet, /* number of bytes sent */
0, /* flags */
(struct sockaddr FAR *)&DestAddr,/* destination address */
sizeof(DestAddr), /* size of addr structure */
NULL, /* overlapped structure */
NULL); /* overlapped callback function */ if (status == SOCKET_ERROR)
{
int mm = WSAGetLastError();
if (mm == WSA_IO_PENDING)
{
AfxMessageBox("重叠操作成功启动!过后将有完成指示");
} AfxMessageBox("WSASendTo() Error");
SendLen = -1;
}
int mm = WSAGetLastError(); 得到的错误号为10014,请高手帮忙,先谢谢了!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货