Class NetherNetHTTPClientSignaling

java.lang.Object
org.cloudburstmc.netty.channel.nethernet.signaling.NetherNetHTTPClientSignaling
All Implemented Interfaces:
AutoCloseable, NetherNetClientSignaling, NetherNetSignaling

public class NetherNetHTTPClientSignaling extends Object implements NetherNetClientSignaling
The client half of HTTP signaling: connects out to a server's /v1/join endpoint, as a proxy does toward a downstream server. One instance serves one connection.

HTTP signaling is a single request and response, so there is no trickle: the channel gathers every candidate first and hands the finished offer to sendDescription(java.lang.String, java.lang.String), and the answer comes back through the signal handler like any other. The offer's identity assertion is the channel's business too, through NetherChannelOption.NETHER_CLIENT_IDENTITY.

Plaintext by default. With secure it speaks HTTPS instead, validating the certificate against the JDK trust store and the host name of the address it was given, so a server behind a real certificate has to be addressed by name. The two have to agree with the server: one that serves TLS refuses plaintext by default, and one that does not cannot be reached securely.

Nothing here runs on the channel's loop, the channel moves itself back onto it.

  • Constructor Details

    • NetherNetHTTPClientSignaling

      public NetherNetHTTPClientSignaling()
      Without STUN or TURN, so the offer carries the local interfaces only and goes out as soon as they are gathered.
    • NetherNetHTTPClientSignaling

      public NetherNetHTTPClientSignaling(List<IceServerInfo> iceServers)
      Parameters:
      iceServers - The STUN and TURN servers to gather through. Every one of them has to answer or time out before the offer can go, since nothing trickles after it.
    • NetherNetHTTPClientSignaling

      public NetherNetHTTPClientSignaling(List<IceServerInfo> iceServers, boolean secure)
      Parameters:
      iceServers - The STUN and TURN servers to gather through, see above
      secure - Whether to signal over HTTPS rather than plaintext HTTP
  • Method Details