Group Group Group Group Group Group Group Group Group

Socket SO_ERROR [61: Connection refused]

Hi,

I’m trying out the tutorial on Ch 30 WebSockets by Logan Wright from the Book ‘Server-Side Swift with Vapor’. Tried the final share-touch-server and -phone projects and got it to work the first time in the simulator. Now that I try to repeat it in the simulator I’m getting an error ShareTouch[2327:194087] [connection] nw_socket_handle_socket_event [C1.1:2] Socket SO_ERROR [61: Connection refused]. I’m using the shareSessionURL of ws://localhost:8080/session. Please if you could advise.

Thanks.

Just before the above error it has another:
ShareTouch[11326:728230] [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed

Perhaps this has something to do with it?
https://developer.apple.com/library/archive/technotes/tn2277/_index.html

Is that coming from the simulator or Vapor? A connection refused error means it can’t connect to what it’s trying to connect to. Is the Vapor app definitely running? Can you connect to it from a different client?

Hi, it’s from the simulator. Tried a few different ones with same result. Thanks.

Think I got it. The websocket connects with ./echo not ./session

1 Like