public SendUserToken(SendState initalState, TaskCompletionSource <int> sendTaskCompletionSource, AsyncSocketMessageTransport parent, bool needToReleaseBuffer) { State = initalState; SendTaskCompletionSource = sendTaskCompletionSource; Parent = parent; NeedToReleaseBuffer = needToReleaseBuffer; }
public RecieveUserToken([NotNull] Socket socket, RecieveState initalState, [NotNull] TaskCompletionSource <TcpMessage> recieveTaskCompletionSource, [NotNull] AsyncSocketMessageTransport parent) { if (socket == null) { throw new ArgumentNullException("socket"); } if (recieveTaskCompletionSource == null) { throw new ArgumentNullException("recieveTaskCompletionSource"); } if (parent == null) { throw new ArgumentNullException("parent"); } Socket = socket; State = initalState; RecieveTaskCompletionSource = recieveTaskCompletionSource; Parent = parent; }