APIdia Launch Partner
Top Description Methods
com.badlogic.gdx.net

public Interface ServerSocket

extends Disposable
Known Direct Implementers
com.badlogic.gdx.net.NetJavaServerSocketImpl
Imports
com.badlogic.gdx.Net.Protocol, com.badlogic.gdx.utils.Disposable, .GdxRuntimeException

A server socket that accepts new incoming connections, returning Socket instances. The accept(SocketHints) method should preferably be called in a separate thread as it is blocking.
Authors
mzechner, noblemaster

Method Summary

Modifier and TypeMethod and Description
public Socket

Returns:

the accepted Socket
accept
(SocketHints
additional SocketHints applied to the accepted Socket. Input null to use the default setting provided by the system.
hints
)

Accepts a new incoming connection from a client Socket.

public Net.Protocol
getProtocol()

Returns: the Protocol used by this socket

Inherited from com.badlogic.gdx.utils.Disposable:
dispose

Method Detail

acceptback to summary
public Socket accept(SocketHints hints)

Accepts a new incoming connection from a client Socket. The given hints will be applied to the accepted socket. Blocking, call on a separate thread.

Parameters
hints:SocketHints

additional SocketHints applied to the accepted Socket. Input null to use the default setting provided by the system.

Returns:Socket

the accepted Socket

Exceptions
GdxRuntimeException:
in case an error occurred
getProtocolback to summary
public Net.Protocol getProtocol()
Returns:Net.Protocol

the Protocol used by this socket