Package dev.forbit.server.networks.gson
Class GSONServer
java.lang.Object
java.lang.Thread
dev.forbit.server.abstracts.Server
dev.forbit.server.networks.gson.GSONServer
- All Implemented Interfaces:
ServerInterface
,Runnable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
How many milliseconds we should wait before force disconnecting the client from the server.void
Fired when a client is registered on the TCP and UDP server.void
onDisconnect(Client client)
Fired when the client disconnects from the server.Methods inherited from class dev.forbit.server.abstracts.Server
addClient, forceDisconnect, getClient, getClient, getClient, getScheduler, init, removeClient, run, sendPacketTCP, sendPacketUDP, shutdown, updateClients
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface dev.forbit.server.interfaces.ServerInterface
getServerProperties, getTCPServer, getUDPServer, setServerProperties, setTCPServer, setUDPServer
-
Constructor Details
-
GSONServer
-
-
Method Details
-
onConnect
Description copied from interface:ServerInterface
Fired when a client is registered on the TCP and UDP server.Client should have a Channel and an Address.
-
onDisconnect
Description copied from interface:ServerInterface
Fired when the client disconnects from the server. -
getTimeout
public int getTimeout()Description copied from interface:ServerInterface
How many milliseconds we should wait before force disconnecting the client from the server.- Returns:
- the timeout in milliseconds
-