예제 #1
0
            protected override bool TryGetConnection(int connectionId, out UdpConnection oconnection)
            {
                oconnection = null;
                if (this.connection.ConnectionId == 0 || connectionId == this.connection.ConnectionId)
                {
                    oconnection = this.connection;
                    return(true);
                }

                return(false);
            }
예제 #2
0
        protected override bool TryGetConnection(int connectionId, out UdpConnection connection)
        {
            connection = null;

            UdpServerConnection server;
            bool found = this.connections.TryGetValue(connectionId, out server);

            if (found)
            {
                connection = server;
                return(true);
            }

            return(false);
        }
예제 #3
0
 protected abstract bool TryGetConnection(int connectionId, out UdpConnection connection);