예제 #1
0
        internal static void OnClientIdentified(object sender, JamServer.IdentifiedConnectionEventArgs e)
        {
            Console.WriteLine("Client: {0} identified as: {1} - {2}.", e.RemoteEndPoint, e.Account.AccountID, e.Account.Username);

            AccountOnlineStatusChangedImperative imperative = new AccountOnlineStatusChangedImperative(e.Account, true, e.ServerConnection.Serializer);

            JamPacket imperativePacket = new JamPacket(Guid.Empty, Guid.Empty, AccountOnlineStatusChangedImperative.DATA_TYPE, imperative.GetBytes());

            foreach (JamServerConnection connection in e.ServerConnection.Server.GetAllConnections())
            {
                connection.Send(imperativePacket);
            }
        }
예제 #2
0
 internal static void OnClientOfflineAppRequest(object sender, JamServer.IdentifiedConnectionEventArgs e)
 {
     Console.WriteLine("Client: {0} requested access to an app not currently running against this server.", e.RemoteEndPoint);
 }
예제 #3
0
 internal static void OnClientConnectedElsewhere(object sender, JamServer.IdentifiedConnectionEventArgs e)
 {
     Console.WriteLine("Client: {0} has connected elsewhere, closing existing connection...", e.RemoteEndPoint);
 }