taoensso / sente

Realtime web comms library for Clojure/Script
https://www.taoensso.com/sente
Eclipse Public License 1.0
1.74k stars 193 forks source link

Can sente, used as client, use a different websocket-port? #300

Closed bennyandresen closed 7 years ago

bennyandresen commented 7 years ago

Hey,

excuse me if this is very obvious, but I don't find the ability to specify a port anywhere. (Compared to how often this is shown in basic websockets articles - I'm new to this.)

I have a websocket server running on say port 35197, but any combination of ws://localhost:35197/chsk or using :host "localhost:35197" I only get something like this: #object[Error Error: No matching clause: file:] Error: No matching clause: file:

when attempting something like this: (sente/make-channel-socket-client! "ws://localhost:35197/chsk")

For any pointers I would be very thankful.

bennyandresen commented 7 years ago

I just tried explicitly setting several keywords:

if I pass {:type :ws :host "localhost:35197" :protocol "http:"} then it works. No idea why it defaulted to file: based on the code.