private Bind_Connect_End ( IAsyncResult ar ) : void | ||
ar | IAsyncResult | |
Результат | void |
void Bind_Connect_End(IAsyncResult ar)
{
Bind_SO stateObj = (Bind_SO)ar.AsyncState;
try
{
stateObj.UpdateContext();
_socket.EndConnect(ar);
//------------------------------------
// Send CONNECT command
//
byte[] cmd = PrepareBindCmd(stateObj.BaseSocket);
NStream.BeginWrite(
cmd,
0,
cmd.Length,
new AsyncCallback(Bind_Write_End),
stateObj);
}
catch(Exception e)
{
stateObj.Exception = e;
stateObj.SetCompleted();
}
}