ConnectAsync() public method

public ConnectAsync ( Target target, MessageTypes messageTypes ) : Task
target Target
messageTypes MessageTypes
return Task
示例#1
0
        public Tuple <MockClientConnection, MockServerConnection> GetConnections(IEnumerable <Protocol> protocols)
        {
            if (protocols == null)
            {
                throw new ArgumentNullException("protocols");
            }

            MockClientConnection c = new MockClientConnection(this, protocols);

            c.ConnectionId = Interlocked.Increment(ref this.cid);
            c.ConnectAsync(new Target(Target.AnyIP, 0), MessageTypes.Reliable);

            return(new Tuple <MockClientConnection, MockServerConnection> (c, c.connection));
        }
示例#2
0
        public Tuple<MockClientConnection, MockServerConnection> GetConnections(IEnumerable<Protocol> protocols)
        {
            if (protocols == null)
                throw new ArgumentNullException ("protocols");

            MockClientConnection c = new MockClientConnection (this, protocols);
            c.ConnectionId = Interlocked.Increment (ref this.cid);
            c.ConnectAsync (new Target (Target.AnyIP, 0), MessageTypes.Reliable);

            return new Tuple<MockClientConnection, MockServerConnection> (c, c.connection);
        }