libgdx API

com.badlogic.gdx.net
Interface Socket

All Superinterfaces:
Disposable

public interface Socket
extends Disposable

A client socket that talks to a server socket via some Net.Protocol. See Net.newClientSocket(Protocol, String, int, SocketHints) and Net.newServerSocket(Protocol, int, ServerSocketHints).

A socket has an InputStream used to send data to the other end of the connection, and an OutputStream to receive data from the other end of the connection.

A socket needs to be disposed if it is no longer used. Disposing also closes the connection.

Author:
mzechner

Method Summary
 java.io.InputStream getInputStream()
           
 java.io.OutputStream getOutputStream()
           
 boolean isConnected()
           
 
Methods inherited from interface com.badlogic.gdx.utils.Disposable
dispose
 

Method Detail

isConnected

boolean isConnected()
Returns:
whether the socket is connected

getInputStream

java.io.InputStream getInputStream()
Returns:
the InputStream used to read data from the other end of the connection.

getOutputStream

java.io.OutputStream getOutputStream()
Returns:
the OutputStream used to write data to the other end of the connection.

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)