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

public Class NetJavaServerSocketImpl

extends Object
implements ServerSocket
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.net.ServerSocket, com.badlogic.gdx.utils.Disposable
Imports
java.net.InetSocketAddress, com.badlogic.gdx.Net.Protocol, com.badlogic.gdx.utils.GdxRuntimeException

Server socket implementation using java.net.ServerSocket.
Author
noblemaster

Field Summary

Modifier and TypeField and Description
private Net.Protocol
private ServerSocket
server

Our server or null for disposed, aka closed.

Constructor Summary

AccessConstructor and Description
public
public
NetJavaServerSocketImpl(Net.Protocol protocol, String hostname, int port, ServerSocketHints hints)

Method Summary

Modifier and TypeMethod and Description
public Socket
accept(SocketHints hints)

Implements com.badlogic.gdx.net.ServerSocket.accept.

Accepts a new incoming connection from a client Socket.

public void
dispose()

Implements com.badlogic.gdx.utils.Disposable.dispose.

Releases all resources of this object.

public Net.Protocol
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

protocolback to summary
private Net.Protocol protocol
serverback to summary
private ServerSocket server

Our server or null for disposed, aka closed.

Constructor Detail

NetJavaServerSocketImplback to summary
public NetJavaServerSocketImpl(Net.Protocol protocol, int port, ServerSocketHints hints)
NetJavaServerSocketImplback to summary
public NetJavaServerSocketImpl(Net.Protocol protocol, String hostname, int port, ServerSocketHints hints)

Method Detail

acceptback to summary
public Socket accept(SocketHints hints)

Implements com.badlogic.gdx.net.ServerSocket.accept.

Doc from com.badlogic.gdx.net.ServerSocket.accept.

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.

Annotations
@Override
disposeback to summary
public void dispose()

Implements com.badlogic.gdx.utils.Disposable.dispose.

Doc from com.badlogic.gdx.utils.Disposable.dispose.

Releases all resources of this object.

Annotations
@Override
getProtocolback to summary
public Net.Protocol getProtocol()

Implements com.badlogic.gdx.net.ServerSocket.getProtocol.

Annotations
@Override