public class WebSocketClient
This class represents the client itself.
@Nullable private com.neovisionaries.ws.client.WebSocket socket
private boolean checked
private boolean connected
@NotNull private java.lang.String url
the websocket url
@NotNull private com.neovisionaries.ws.client.WebSocketAdapter adapter
the adapter to handle this client
private boolean tls
whether to use tls support
private boolean suppress
public WebSocketClient(@NotNull
java.lang.String url,
@NotNull
com.neovisionaries.ws.client.WebSocketAdapter adapter,
boolean tls,
boolean suppress)
This class represents the client itself.
url - the websocket urladapter - the adapter to handle this clienttls - whether to use tls support@Nullable public com.neovisionaries.ws.client.WebSocket getSocket()
private void setSocket(com.neovisionaries.ws.client.WebSocket p)
public boolean getChecked()
private void setChecked(boolean p)
public boolean getConnected()
private void setConnected(boolean p)
public boolean connect()
Try connecting to websocket
public void disconnect()
Disconnect from websocket
@NotNull public WebSocketClient send(@NotNull java.lang.String message)
Send text to websocket
message - a String to send to client@NotNull public WebSocketClient send(@NotNull kotlin.Array[] binary)
Send binary to websocket
binary - a binary to send to client@NotNull public java.lang.String getUrl()
the websocket url
@NotNull public com.neovisionaries.ws.client.WebSocketAdapter getAdapter()
the adapter to handle this client
public boolean getTls()
whether to use tls support
public boolean getSuppress()