public override void OnConnectionCreate(NetworkSystem system, NetConnection netConnection) { NetworkConnection con = new NetworkConnection(netConnection); con.AddNetworkChannel(NetworkChannel.LOGIN, new NetHandlerLoginServer(this, con)); //TODO Add Channel Handlers _connections.Add(netConnection.RemoteUniqueIdentifier, con); }
public void Connect(string host, int port) { _connection = new NetworkConnection(null); _connection.AddNetworkChannel(NetworkChannel.LOGIN, new NetHandlerLoginClient(this, _connection)); Client.Connect(host, port); }