示例#1
0
        private void PushClientConnected(ClientAssigned p)
        {
            NetworkLogger.Log("Client connection finalized", LogCategory.Connections);
            PayloadHandler.RemoveCallback <ClientAssigned>(PushClientConnected);

            if (ClientManager.TryGetClient(p.id, out var client))
            {
                PayloadHandler.PushPayload(new ClientConnected {
                    Client = client
                });
            }
        }
示例#2
0
 /// <summary>
 /// Remove a function from being invoked when a payload of a certain type is received.
 /// </summary>
 /// <typeparam name="T">The payload type being listened for</typeparam>
 /// <param name="c">The method to remove</param>
 public void RemoveCallback <T>(FlarePayloadCallback <T> c) where T : INetworkPayload => PayloadHandler.RemoveCallback(c);