Esempio n. 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);
            }
        }
Esempio n. 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);
 }
Esempio n. 3
0
 internal static void OnClientConnectedElsewhere(object sender, JamServer.IdentifiedConnectionEventArgs e)
 {
     Console.WriteLine("Client: {0} has connected elsewhere, closing existing connection...", e.RemoteEndPoint);
 }