public class BufferedTCPRelayClient extends BufferedRelayClient
TCPRelayClient, but exending from the
BufferedRelayClient such that the RelayRPC can distinguish between buffered and unbuffered
connections.peerlisteners| Constructor and Description |
|---|
BufferedTCPRelayClient(PeerConnection connection,
Peer peer) |
| Modifier and Type | Method and Description |
|---|---|
void |
onMapUpdateFailed()
Is called when the
PeerMapUpdateTask failed to send the new map. |
void |
onMapUpdateSuccess()
Is called when the
PeerMapUpdateTask successfully sent the map
to the relay peer. |
FutureDone<Void> |
sendBufferRequest()
Send a request to the relay peer to obtain the buffer.
|
FutureResponse |
sendToRelay(Message message) |
FutureDone<Void> |
shutdown() |
onReceiveMessageBufferaddCloseListener, notifyCloseListeners, relayAddresspublic BufferedTCPRelayClient(PeerConnection connection, Peer peer)
public FutureDone<Void> sendBufferRequest()
BufferedRelayClientsendBufferRequest in class BufferedRelayClientpublic FutureResponse sendToRelay(Message message)
sendToRelay in class BaseRelayClientpublic FutureDone<Void> shutdown()
shutdown in class BaseRelayClientpublic void onMapUpdateSuccess()
BaseRelayClientPeerMapUpdateTask successfully sent the map
to the relay peer.onMapUpdateSuccess in class BaseRelayClientpublic void onMapUpdateFailed()
BaseRelayClientPeerMapUpdateTask failed to send the new map.
This can act as an indicator that the relay peer is now offline.onMapUpdateFailed in class BaseRelayClientCopyright © 2015. All rights reserved.