Module technology.sola.engine
Class JavaSocketClient
java.lang.Object
technology.sola.engine.networking.socket.JavaSocketClient
- All Implemented Interfaces:
SocketClient
A Java-based implementation of
SocketClient
utilizing Socket
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Connects to a server by host and port.void
Disconnect from the server.boolean
void
sendMessage
(SocketMessage socketMessage) Sends a message to the server.
-
Constructor Details
-
JavaSocketClient
public JavaSocketClient()
-
-
Method Details
-
getNetworkQueue
- Specified by:
getNetworkQueue
in interfaceSocketClient
- Returns:
- the queue of messages from the server
-
sendMessage
Description copied from interface:SocketClient
Sends a message to the server.- Specified by:
sendMessage
in interfaceSocketClient
- Parameters:
socketMessage
- theSocketMessage
to send
-
connect
Description copied from interface:SocketClient
Connects to a server by host and port.- Specified by:
connect
in interfaceSocketClient
- Parameters:
host
- the host of the serverport
- the port accepting connections
-
disconnect
public void disconnect()Description copied from interface:SocketClient
Disconnect from the server.- Specified by:
disconnect
in interfaceSocketClient
-
isConnected
public boolean isConnected()- Specified by:
isConnected
in interfaceSocketClient
- Returns:
- true if connected to a server
-