Interface PeerConnection
- All Known Implementing Classes:
PeerjsConnection
public interface PeerConnection
Access to a currently active peer-to-peer connection, which can be obtained
from
Network
. The protocol used for the connection depends on both
the renderer and the current platform. This also means that it is generally
not possible to connect to peers on other platforms.
Since this is a peer-to-peer connection, it is possible to connect to multiple peers. In that situation, messages will be sent to all peers, and received messages will similarly include all peers.
-
Method Summary
-
Method Details
-
getId
String getId() -
connect
Attempts to connect to the peer with the specified ID. If the connection is successful, messages will be sent to and received from the peer until it disconnects. -
sendMessage
-
getReceivedMessages
-
close
void close()
-