Package com.esotericsoftware.kryonet.examples.chat.Network

Examples of com.esotericsoftware.kryonet.examples.chat.Network.UpdateNames


        client.sendTCP(registerName);
      }

      public void received (Connection connection, Object object) {
        if (object instanceof UpdateNames) {
          UpdateNames updateNames = (UpdateNames)object;
          chatFrame.setNames(updateNames.names);
          return;
        }

        if (object instanceof ChatMessage) {
View Full Code Here


        client.sendTCP(registerName);
      }

      public void received (Connection connection, Object object) {
        if (object instanceof UpdateNames) {
          UpdateNames updateNames = (UpdateNames)object;
          chatFrame.setNames(updateNames.names);
          return;
        }

        if (object instanceof ChatMessage) {
View Full Code Here

    for (int i = connections.length - 1; i >= 0; i--) {
      ChatConnection connection = (ChatConnection)connections[i];
      names.add(connection.name);
    }
    // Send the names to everyone.
    UpdateNames updateNames = new UpdateNames();
    updateNames.names = (String[])names.toArray(new String[names.size()]);
    server.sendToAllTCP(updateNames);
  }
View Full Code Here

TOP

Related Classes of com.esotericsoftware.kryonet.examples.chat.Network.UpdateNames

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.