webkit
2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
|
Classes | |
interface | TCPChannelEvents |
Public Member Functions | |
TCPChannelClient (ExecutorService executor, TCPChannelEvents eventListener, String ip, int port) | |
void | disconnect () |
void | send (String message) |
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.
|
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.
eventListener | Listener that will receive events from the client. |
ip | IP address to listen on or connect to. |
port | Port to listen on or connect to. |
|
inline |
Disconnects the client if not already disconnected. This will fire the onTCPClose event.
|
inline |
Sends a message on the socket.
message | Message to be sent. |