public class XStreamClient
public XStreamClient(INetworkInterface networkInterface)
public boolean isReady()
public void start()
Signals that client can receive and send.
protected void onObject(ProtocolMessage o)
public void receiveThread()
Used by the receiving thread. All exceptions should be handled.
public void sendCustomData(java.lang.String data)
public void sendCustomData(kotlin.Array[] data)
public void send(ProtocolMessage packet)
protected void handleDisconnect(sc.networking.clients.XStreamClient.DisconnectCause cause)
protected void handleDisconnect(sc.networking.clients.XStreamClient.DisconnectCause cause, java.lang.Throwable exception)
protected void onDisconnect(sc.networking.clients.XStreamClient.DisconnectCause cause)
public sc.networking.clients.XStreamClient.DisconnectCause getDisconnectCause()
public void stop()
Should be called when the client needs to be stopped and the disconnect is initiated on this side. There are two situations where this should be done:
- A game has ended - An internal error occurred (this situation might be redundant)
protected void stopReceiver()
protected void close()
public com.thoughtworks.xstream.XStream getXStream()
public boolean isClosed()
public java.lang.String shortString()
public java.lang.String toString()