Exemplo n.º 1
0
        /// <summary>
        /// connect host mode
        /// </summary>
        public static void ConnectLocalServer()
        {
            // call server OnConnected with server's connection to client
            NetworkServer.OnConnected(NetworkServer.localConnection);

            // call client OnConnected with client's connection to server
            // => previously we used to send a ConnectMessage to
            //    NetworkServer.localConnection. this would queue the message
            //    until NetworkClient.Update processes it.
            // => invoking the client's OnConnected event directly here makes
            //    tests fail. so let's do it exactly the same order as before by
            //    queueing the event for next Update!
            //OnConnectedEvent?.Invoke(connection);
            ((ULocalConnectionToServer)connection).QueueConnectedEvent();
        }
Exemplo n.º 2
0
 /// <summary>
 /// connect host mode
 /// </summary>
 public static void ConnectLocalServer()
 {
     NetworkServer.OnConnected(NetworkServer.localConnection);
     NetworkServer.localConnection.Send(new ConnectMessage());
 }
Exemplo n.º 3
0
 /// <summary>
 /// connect host mode
 /// </summary>
 internal void ConnectLocalServer(NetworkServer server)
 {
     server.OnConnected(server.localConnection);
     server.localConnection.Send(new ConnectMessage());
 }