Beispiel #1
0
 public SendUserToken(SendState initalState, TaskCompletionSource <int> sendTaskCompletionSource,
                      AsyncSocketMessageTransport parent, bool needToReleaseBuffer)
 {
     State = initalState;
     SendTaskCompletionSource = sendTaskCompletionSource;
     Parent = parent;
     NeedToReleaseBuffer = needToReleaseBuffer;
 }
Beispiel #2
0
            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;
            }