Class GameServer

All Implemented Interfaces:
Runnable

public class GameServer extends SugarServer
  • Field Details

  • Constructor Details

  • Method Details

    • onPeerConnect

      protected void onPeerConnect(Peer peer)
      Description copied from class: SugarServer
      The server calls this function any time a peer connects to the server
      Specified by:
      onPeerConnect in class SugarServer
      Parameters:
      peer - the peer that has connected
    • onPeerDisconnect

      protected void onPeerDisconnect(Peer peer)
      Description copied from class: SugarServer
      The server calls this function any time a peer disconnects from the server
      Specified by:
      onPeerDisconnect in class SugarServer
      Parameters:
      peer - the peer that disconnected from the server
    • onPeerMessage

      protected void onPeerMessage(Peer peer, SugarMessage message)
      Description copied from class: SugarServer
      The server calls this function any time it receives a message from a peer.
      Specified by:
      onPeerMessage in class SugarServer
      Parameters:
      peer - the peer who sent the message
      message - the message received from the peer