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

public Class HeadlessNet

extends Object
implements Net
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.Net
Imports
java.awt.Desktop, .Desktop.Action, .GraphicsEnvironment, com.badlogic.gdx.Gdx, .Net, com.badlogic.gdx.net.NetJavaImpl, .NetJavaServerSocketImpl, .NetJavaSocketImpl, .ServerSocket, .ServerSocketHints, .Socket, .SocketHints

Headless implementation of the com.badlogic.gdx.Net API, based on LWJGL implementation
Authors
acoppes, Jon Renner

Field Summary

Modifier and TypeField and Description
pack-priv NetJavaImpl

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
public Socket
newClientSocket(Net.Protocol protocol, String host, int port, SocketHints hints)

Implements com.badlogic.gdx.Net.newClientSocket.

Creates a new TCP client socket that connects to the given host and port.

public ServerSocket
newServerSocket(Net.Protocol protocol, String hostname, int port, ServerSocketHints hints)

Implements com.badlogic.gdx.Net.newServerSocket.

Creates a new server socket on the given address and port, using the given Protocol, waiting for incoming connections.

public ServerSocket
newServerSocket(Net.Protocol protocol, int port, ServerSocketHints hints)

Implements com.badlogic.gdx.Net.newServerSocket.

Creates a new server socket on the given port, using the given Protocol, waiting for incoming connections.

public boolean
openURI(String URI)

Implements com.badlogic.gdx.Net.openURI.

Launches the default browser to display a URI.

public void
sendHttpRequest(Net.HttpRequest httpRequest, Net.HttpResponseListener httpResponseListener)

Implements com.badlogic.gdx.Net.sendHttpRequest.

Process the specified HttpRequest and reports the HttpResponse to the specified HttpResponseListener.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

netJavaImplback to summary
pack-priv NetJavaImpl netJavaImpl

Constructor Detail

HeadlessNetback to summary
public HeadlessNet(HeadlessApplicationConfiguration configuration)

Method Detail

cancelHttpRequestback to summary
public void cancelHttpRequest(Net.HttpRequest httpRequest)

Implements com.badlogic.gdx.Net.cancelHttpRequest.

Annotations
@Override
isHttpRequestPendingback to summary
public boolean isHttpRequestPending(Net.HttpRequest httpRequest)

Implements com.badlogic.gdx.Net.isHttpRequestPending.

Annotations
@Override
newClientSocketback to summary
public Socket newClientSocket(Net.Protocol protocol, String host, int port, SocketHints hints)

Implements com.badlogic.gdx.Net.newClientSocket.

Doc from com.badlogic.gdx.Net.newClientSocket.

Creates a new TCP client socket that connects to the given host and port.

Annotations
@Override
newServerSocketback to summary
public ServerSocket newServerSocket(Net.Protocol protocol, String hostname, int port, ServerSocketHints hints)

Implements com.badlogic.gdx.Net.newServerSocket.

Doc from com.badlogic.gdx.Net.newServerSocket.

Creates a new server socket on the given address and port, using the given Protocol, waiting for incoming connections.

Annotations
@Override
newServerSocketback to summary
public ServerSocket newServerSocket(Net.Protocol protocol, int port, ServerSocketHints hints)

Implements com.badlogic.gdx.Net.newServerSocket.

Doc from com.badlogic.gdx.Net.newServerSocket.

Creates a new server socket on the given port, using the given Protocol, waiting for incoming connections.

Annotations
@Override
openURIback to summary
public boolean openURI(String URI)

Implements com.badlogic.gdx.Net.openURI.

Doc from com.badlogic.gdx.Net.openURI.

Launches the default browser to display a URI. If the default browser is not able to handle the specified URI, the application registered for handling URIs of the specified type is invoked. The application is determined from the protocol and path of the URI. A best effort is made to open the given URI; however, since external applications are involved, no guarantee can be made as to whether the URI was actually opened. If it is known that the URI was not opened, false will be returned; otherwise, true will be returned.

Annotations
@Override
sendHttpRequestback to summary
public void sendHttpRequest(Net.HttpRequest httpRequest, Net.HttpResponseListener httpResponseListener)

Implements com.badlogic.gdx.Net.sendHttpRequest.

Doc from com.badlogic.gdx.Net.sendHttpRequest.

Process the specified HttpRequest and reports the HttpResponse to the specified HttpResponseListener.

Annotations
@Override