webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Public Member Functions | List of all members
org.appspot.apprtc.TCPChannelClient Class Reference

Classes

interface  TCPChannelEvents
 

Public Member Functions

 TCPChannelClient (ExecutorService executor, TCPChannelEvents eventListener, String ip, int port)
 
void disconnect ()
 
void send (String message)
 

Detailed Description

Replacement for WebSocketChannelClient for direct communication between two IP addresses. Handles the signaling between the two clients using a TCP connection.

All public methods should be called from a looper executor thread passed in a constructor, otherwise exception will be thrown. All events are dispatched on the same thread.

Constructor & Destructor Documentation

◆ TCPChannelClient()

org.appspot.apprtc.TCPChannelClient.TCPChannelClient ( ExecutorService  executor,
TCPChannelEvents  eventListener,
String  ip,
int  port 
)
inline

Initializes the TCPChannelClient. If IP is a local IP address, starts a listening server on that IP. If not, instead connects to the IP.

Parameters
eventListenerListener that will receive events from the client.
ipIP address to listen on or connect to.
portPort to listen on or connect to.

Member Function Documentation

◆ disconnect()

void org.appspot.apprtc.TCPChannelClient.disconnect ( )
inline

Disconnects the client if not already disconnected. This will fire the onTCPClose event.

◆ send()

void org.appspot.apprtc.TCPChannelClient.send ( String  message)
inline

Sends a message on the socket.

Parameters
messageMessage to be sent.

The documentation for this class was generated from the following file: