API reference / @jsprismarine/nethernet / HttpSignaling
Class: HttpSignaling
Defined in: packages/nethernet/src/HttpSignaling.ts:111
NetherNet's HTTP signaling, which a client joining by address uses: it probes GET /v1/join on the game port's TCP side, then posts its complete SDP offer to POST /v1/join/{networkId} and reads the complete answer from the response. One request per attempt; trickle ICE is off, so each side's candidates travel inside its description.
The offer goes to the same NetherNetServer LAN signaling feeds, so a peer negotiated here reaches the server through NetherNetTransport like any other. HTTP carries no connection ID, so this picks one for each offer, unused by any live peer. The network ID in the path is the client's and opaque: it names the client in the log and nothing reads it.
Constructors
Constructor
new HttpSignaling(
options):HttpSignaling
Defined in: packages/nethernet/src/HttpSignaling.ts:117
Parameters
options
Returns
HttpSignaling
Methods
close()
close():
void
Defined in: packages/nethernet/src/HttpSignaling.ts:144
Stops listening and drops open requests.
Returns
void
listen()
listen(
port,host):Promise<number>
Defined in: packages/nethernet/src/HttpSignaling.ts:132
Listens on TCP.
Parameters
port
number
The game port; NetherNet signals on its TCP side.
host
string
The address to bind.
Returns
Promise<number>
The bound port, which differs from port when that was 0.