thiscurSocket = new Socket(AddressFamilyInterNetwork, SocketTypeStream, ProtocolTypeTcp);
IPEndPoint lEp = new IPEndPoint(IPAddressParse(srcIp),23);
if (false == thiscurSocketIsBound)
{
thiscurSocketBind(lEp);
}
IPEndPoint rEp = new IPEndPoint(IPAddressParse(dstIp), intParse(dstPort));
thiscurSocketBlocking = false;
IAsyncResult iAsyncRet = thiscurSocketBeginConnect(
rEp,
new AsyncCallback(ConnectCallback),
curSocket);
// 这里修改如下:
// long stopTm = DateTimeNowAddSeconds(tm)Ticks;
while(iAsyncRetIsCompleted==false);
IAsyncResult ar = thiscurSocketBeginSend(smk, 0, smkLength,
SocketFlagsNone,
callbackEndDispatch,
thiscurSocket);
欢迎分享,转载请注明来源:品搜搜测评网