public static void SendMessage(Client client, bool success) { RawMessage message = PrepareMessageFor(typeof(OM_LeaveQueueResult)); message.putBool("success", success); client.SendMessage(message); }
public static void sendMessage(bool result) { RawMessage msg = new RawMessage(); msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GReadyStateResult))); msg.putBool("r", result); Network.server.SendMessage(msg); }
public static void sendMessage(User user, bool result) { RawMessage msg = new RawMessage(); msg.putInt("id", TypeIdGenerator.getMessageId(typeof(LCancelQueueResult))); msg.putBool("r", result); user.session.client.SendMessage(msg); }
private void sendLoginResponse(SslStreamObject sslStreamObject, bool response, string reason) { RawMessage message = new RawMessage(); message.putBool("response", response); message.putUTF8String("reason", reason); sslStreamObject.WriteSingleMessage(message); }
public static void sendMessage(ICollection <Player> players, bool result) { RawMessage msg = new RawMessage(); msg.putInt("id", TypeIdGenerator.getMessageId(typeof(GReadyStateResult))); msg.putBool("r", result); foreach (Player player in players) { player.user.session.client.SendMessage(msg); } }
public static void SendMessage(Client client, bool success, User user = null) { RawMessage message = PrepareMessageFor(typeof(OM_LoginResult)); message.putBool("success", success); if (success) { message.putUTF8String("username", user.username); message.putInt("id", user.id); } client.SendMessage(message); }
public static void sendMessage(User receiver, bool result) { RawMessage msg = new RawMessage(); msg.putInt("id", TypeIdGenerator.getMessageId(typeof(LoginResult))); msg.putBool("r", result); msg.putUTF8String("un", receiver.username); msg.putInt("ui", receiver.id); msg.putInt("psp", receiver.physicsSciencePoint); msg.putInt("csp", receiver.chemistrySciencePoint); msg.putInt("bsp", receiver.biologySciencePoint); msg.putBoolArray("usn", receiver.unlockedScienceNodes); receiver.session.client.SendMessage(msg); }