Class WebSocketConnection
- java.lang.Object
-
- in.dragonbra.javasteam.networking.steam3.Connection
-
- in.dragonbra.javasteam.networking.steam3.WebSocketConnection
-
public class WebSocketConnection extends Connection
-
-
Constructor Summary
Constructors Constructor Description WebSocketConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect(java.net.InetSocketAddress endPoint, int timeout)Connects to the specified end point.voiddisconnect()Disconnects this instance.java.net.InetSocketAddressgetCurrentEndPoint()java.net.InetAddressgetLocalIP()Gets the local IP.ProtocolTypesgetProtocolTypes()voidonClose(boolean remote)voidonData(byte[] data)voidonError(java.lang.Exception ex)voidonOpen()voidsend(byte[] data)Sends the specified data packet.-
Methods inherited from class in.dragonbra.javasteam.networking.steam3.Connection
connect, getConnected, getDisconnected, getNetMsgReceived
-
-
-
-
Method Detail
-
connect
public void connect(java.net.InetSocketAddress endPoint, int timeout)Description copied from class:ConnectionConnects to the specified end point.- Specified by:
connectin classConnection- Parameters:
endPoint- The end point to connect to.timeout- Timeout in milliseconds
-
disconnect
public void disconnect()
Description copied from class:ConnectionDisconnects this instance.- Specified by:
disconnectin classConnection
-
send
public void send(byte[] data)
Description copied from class:ConnectionSends the specified data packet.- Specified by:
sendin classConnection- Parameters:
data- The data packet to send.
-
getLocalIP
public java.net.InetAddress getLocalIP()
Description copied from class:ConnectionGets the local IP.- Specified by:
getLocalIPin classConnection- Returns:
- The local IP.
-
getCurrentEndPoint
public java.net.InetSocketAddress getCurrentEndPoint()
- Specified by:
getCurrentEndPointin classConnection
-
getProtocolTypes
public ProtocolTypes getProtocolTypes()
- Specified by:
getProtocolTypesin classConnection- Returns:
- The type of communication protocol that this connection uses.
-
onData
public void onData(byte[] data)
-
onClose
public void onClose(boolean remote)
-
onError
public void onError(java.lang.Exception ex)
-
onOpen
public void onOpen()
-
-