Class RelayComms

java.lang.Object
com.bitheads.braincloud.comms.RelayComms

public class RelayComms
extends Object
  • Constructor Details

  • Method Details

    • getLoggingEnabled

      public boolean getLoggingEnabled()
    • enableLogging

      public void enableLogging​(boolean isEnabled)
    • connect

      public void connect​(RelayConnectionType connectionType, org.json.JSONObject options, IRelayConnectCallback callback)
      Start off a connection, based off connection type to brainCloud's Relay Servers. Connect options come in from "ROOM_ASSIGNED" lobby callback
      Parameters:
      connectionType - The connection type. INVALID, WEBSOCKET, TCP, UDP, MAX
      options - Options sent in the connection
      callback - The method to be invoked when the server response is received
    • disconnect

      public void disconnect()
    • endMatch

      public void endMatch​(org.json.JSONObject json)
    • isConnected

      public boolean isConnected()
    • getPing

      public int getPing()
    • setPingInterval

      public void setPingInterval​(int intervalMS)
    • getOwnerProfileId

      public String getOwnerProfileId()
    • getProfileIdForNetId

      public String getProfileIdForNetId​(int netId)
    • getNetIdForProfileId

      public int getNetIdForProfileId​(String profileId)
    • getOwnerCxId

      public String getOwnerCxId()
    • getCxIdForNetId

      public String getCxIdForNetId​(int netId)
    • getNetIdForCxId

      public int getNetIdForCxId​(String cxId)
    • registerRelayCallback

      public void registerRelayCallback​(IRelayCallback callback)
    • deregisterRelayCallback

      public void deregisterRelayCallback()
    • registerSystemCallback

      public void registerSystemCallback​(IRelaySystemCallback callback)
    • deregisterSystemCallback

      public void deregisterSystemCallback()
    • sendRelay

      public void sendRelay​(byte[] data, long in_playerMask, boolean reliable, boolean ordered, int channel)
    • runCallbacks

      public void runCallbacks()