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.

By default it does what the retail client does: probes the endpoint over HTTPS, falls back to plaintext when there is no TLS, and posts the offer over whichever answered. HTTPS validates the certificate against the JDK trust store, or the one in the settings, and the host name of the address it was given, so a server behind a certificate has to be addressed by name. A server serving TLS refuses plaintext by default. HttpSignalingSettings fixes the scheme instead.

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