Class Connection
- java.lang.Object
-
- in.dragonbra.javasteam.networking.steam3.Connection
-
- Direct Known Subclasses:
EnvelopeEncryptedConnection,TcpConnection,UdpConnection,WebSocketConnection
public abstract class Connection extends java.lang.Object- Since:
- 2018-02-20
-
-
Constructor Summary
Constructors Constructor Description Connection()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidconnect(java.net.InetSocketAddress endPoint)Connects to the specified end point.abstract voidconnect(java.net.InetSocketAddress endPoint, int timeout)Connects to the specified end point.abstract voiddisconnect()Disconnects this instance.Event<EventArgs>getConnected()abstract java.net.InetSocketAddressgetCurrentEndPoint()Event<DisconnectedEventArgs>getDisconnected()abstract java.net.InetAddressgetLocalIP()Gets the local IP.Event<NetMsgEventArgs>getNetMsgReceived()abstract ProtocolTypesgetProtocolTypes()abstract voidsend(byte[] data)Sends the specified data packet.
-
-
-
Method Detail
-
connect
public abstract void connect(java.net.InetSocketAddress endPoint, int timeout)Connects to the specified end point.- Parameters:
endPoint- The end point to connect to.timeout- Timeout in milliseconds
-
connect
public final void connect(java.net.InetSocketAddress endPoint)
Connects to the specified end point.- Parameters:
endPoint- The end point to connect to.
-
disconnect
public abstract void disconnect()
Disconnects this instance.
-
send
public abstract void send(byte[] data)
Sends the specified data packet.- Parameters:
data- The data packet to send.
-
getLocalIP
public abstract java.net.InetAddress getLocalIP()
Gets the local IP.- Returns:
- The local IP.
-
getCurrentEndPoint
public abstract java.net.InetSocketAddress getCurrentEndPoint()
-
getProtocolTypes
public abstract ProtocolTypes getProtocolTypes()
- Returns:
- The type of communication protocol that this connection uses.
-
getNetMsgReceived
public Event<NetMsgEventArgs> getNetMsgReceived()
-
getDisconnected
public Event<DisconnectedEventArgs> getDisconnected()
-
-