state: socket);
}
- public static Task ConnectAsync(this Socket socket, EndPoint remoteEndPoint)
+ public static Task ConnectAsync(this Socket socket, EndPoint remoteEP)
{
return Task.Factory.FromAsync(
(targetEndPoint, callback, state) => ((Socket)state).BeginConnect(targetEndPoint, callback, state),
asyncResult => ((Socket)asyncResult.AsyncState).EndConnect(asyncResult),
- remoteEndPoint,
+ remoteEP,
state: socket);
}
this Socket socket,
ArraySegment<byte> buffer,
SocketFlags socketFlags,
- EndPoint remoteEndPoint)
+ EndPoint remoteEP)
{
return Task<int>.Factory.FromAsync(
(targetBuffer, flags, endPoint, callback, state) => ((Socket)state).BeginSendTo(
asyncResult => ((Socket)asyncResult.AsyncState).EndSendTo(asyncResult),
buffer,
socketFlags,
- remoteEndPoint,
+ remoteEP,
state: socket);
}
}