- java.lang.Object
-
- dev.bitbite.networking.Client
-
- dev.bitbite.networking.SSLClient
-
public abstract class SSLClient extends Client
-
-
Field Summary
-
Fields inherited from class dev.bitbite.networking.Client
disconnectedServerDetector, HOST, PORT, socket
-
-
Constructor Summary
Constructors Constructor Description SSLClient(java.lang.String host, int port)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidopenSocket()Opens the Socket connection.protected abstract voidprocessReceivedData(byte[] data)This function will be called once the client receives data from the server.-
Methods inherited from class dev.bitbite.networking.Client
close, connect, isConnected, preprocessReceivedData, registerListener, registerListener, removeListener, removeListener, send
-
-
-
-
Method Detail
-
openSocket
protected void openSocket() throws java.net.UnknownHostException, java.io.IOExceptionDescription copied from class:ClientOpens the Socket connection. Moved to a different function to make it easier to replace the Socket implementation.- Overrides:
openSocketin classClient- Throws:
java.net.UnknownHostException- if the specified Host is unknownjava.io.IOException- when the process of opening the Socket fails.
-
processReceivedData
protected abstract void processReceivedData(byte[] data)
Description copied from class:ClientThis function will be called once the client receives data from the server.- Specified by:
processReceivedDatain classClient- Parameters:
data- sent by the server
-
-