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 Socket
accept(SocketHints hints)
Accepts a new incoming connection from a clientSocket
.void
dispose()
Releases all resources of this object.Net.Protocol
getProtocol()
-
-
-
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:
getProtocol
in interfaceServerSocket
- Returns:
- the Protocol used by this socket
-
accept
public Socket accept(SocketHints hints)
Description copied from interface:ServerSocket
Accepts 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:
accept
in interfaceServerSocket
- Parameters:
hints
- additionalSocketHints
applied 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:Disposable
Releases all resources of this object.- Specified by:
dispose
in interfaceDisposable
-
-