cc-tweaked / CC-Tweaked

Just another ComputerCraft fork
https://tweaked.cc
944 stars 210 forks source link

get selected websocket subprotocol #1387

Open natedogith1 opened 1 year ago

natedogith1 commented 1 year ago

828 added support for specifying subprotocols when creating a websocket, but there's no way to check which protocol the server selected.

SquidDev commented 1 year ago

I wonder if it'd make more sense to add a getHeaders method, like we do for HTTP responses. Though there's an argument that's a property of the initial connection, rather than the property of the websocket itself. Not sure!