Beispiel #1
0
    /// <summary>
    /// handles incoming connection info messages
    /// </summary>
    private void HandleConnectionInfo(int connectionId, byte[] buffer, int size)
    {
        NetUtilConnection connection = new NetUtilConnection();

        connection.name             = ConstructType <string>(buffer, 1, size - 1);
        connection.connectionId     = connectionId;
        m_connections[connectionId] = connection;
    }
Beispiel #2
0
    /// <summary>
    /// adds a connection with given connection id and name to netutil
    /// </summary>
    /// <param name="t_id">connection id of the new connection</param>
    /// <param name="t_name">name of the new connection</param>
    private void AddConnection(int t_id, string t_name)
    {
        NetUtilConnection connection = new NetUtilConnection();

        connection.connectionId = t_id;
        connection.name         = t_name;
        m_connections[t_id]     = connection;
    }