Package com.badlogic.gdx.net
Class NetJavaServerSocketImpl
- java.lang.Object
-
- com.badlogic.gdx.net.NetJavaServerSocketImpl
-
- All Implemented Interfaces:
ServerSocket,Disposable
public class NetJavaServerSocketImpl extends java.lang.Object implements ServerSocket
Server socket implementation using java.net.ServerSocket.
-
-
Constructor Summary
Constructors Constructor Description NetJavaServerSocketImpl(Net.Protocol protocol, int port, ServerSocketHints hints)NetJavaServerSocketImpl(Net.Protocol protocol, java.lang.String hostname, int port, ServerSocketHints hints)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Socketaccept(SocketHints hints)Accepts a new incoming connection from a clientSocket.voiddispose()Releases all resources of this object.Net.ProtocolgetProtocol()
-
-
-
Constructor Detail
-
NetJavaServerSocketImpl
public NetJavaServerSocketImpl(Net.Protocol protocol, int port, ServerSocketHints hints)
-
NetJavaServerSocketImpl
public NetJavaServerSocketImpl(Net.Protocol protocol, java.lang.String hostname, int port, ServerSocketHints hints)
-
-
Method Detail
-
getProtocol
public Net.Protocol getProtocol()
- Specified by:
getProtocolin interfaceServerSocket- Returns:
- the Protocol used by this socket
-
accept
public Socket accept(SocketHints hints)
Description copied from interface:ServerSocketAccepts a new incoming connection from a clientSocket. The given hints will be applied to the accepted socket. Blocking, call on a separate thread.- Specified by:
acceptin interfaceServerSocket- Parameters:
hints- additionalSocketHintsapplied to the acceptedSocket. Input null to use the default setting provided by the system.- Returns:
- the accepted
Socket
-
dispose
public void dispose()
Description copied from interface:DisposableReleases all resources of this object.- Specified by:
disposein interfaceDisposable
-
-