Closed stefanmaar closed 1 year ago
I think if you had tried ws://localhost:8080/datalink
it may have worked. By using only DataLink in
ListenPort 16000 DataLink
you are effectively saying do not allow DataLink over web sockets on port 16000, only raw DataLink sockets. Using
ListenPort 8080 HTTP
says allow web socket DataLink and SeedLink, but not the raw socket versions.
I do not know if it is possible to have HTTP connections without allowing web socket DataLink/SeedLink or with only one.
I have tried the ws://localhost:8080/datalink
URL in the beginning.
ringserver refused the connection saying that it can't handle datalink websocket request on non-DataLink port.
Ah ok. A web socket must be created by an upgrade command on an existing http connection and so you can't do a websocket datalink without HTTP. That is in the web socket spec, so out of ringserver's control. Suggest if you want web socket datalink without seedlink that you use ListenPort 16000 DataLink HTTP
, or just ListenPort 16000
if you want to allow both protocols over both types of sockets.
As @crotwell writes, WebSocket requires a combination of both HTTP and SeedLink or DataLink to be enabled. There is no special mode to enable just WebSocket, if there were it would simply be a shortcut combination of protocols, with no way to deny non-WebSocket connections.
Hello.
I tried to initiate a Websocket connection to a ringserver running on localhost using seisplotjs. The seisplotjs application was also running on localhost. Within seisplotjs I tried to connect to the ringserver using the URL
ws://localhost:16000/datalink
.I couldn't connect to the ringserver and the ringserver issued the error message:
The ringserver was configured with dedicated ports for each protocol:
After changing the port configuration to a single port
, the websocket connection worked as expected using the URL
ws://localhost:16000/datalink
.