Package com.badlogic.gdx.net
Interface ServerSocket
-
- All Superinterfaces:
Disposable
- All Known Implementing Classes:
NetJavaServerSocketImpl
public interface ServerSocket extends Disposable
A server socket that accepts new incoming connections, returningSocketinstances. Theaccept(SocketHints)method should preferably be called in a separate thread as it is blocking.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Socketaccept(SocketHints hints)Accepts a new incoming connection from a clientSocket.Net.ProtocolgetProtocol()-
Methods inherited from interface com.badlogic.gdx.utils.Disposable
dispose
-
-
-
-
Method Detail
-
getProtocol
Net.Protocol getProtocol()
- Returns:
- the Protocol used by this socket
-
accept
Socket accept(SocketHints hints)
Accepts a new incoming connection from a clientSocket. The given hints will be applied to the accepted socket. Blocking, call on a separate thread.- Parameters:
hints- additionalSocketHintsapplied to the acceptedSocket. Input null to use the default setting provided by the system.- Returns:
- the accepted
Socket - Throws:
GdxRuntimeException- in case an error occurred
-
-