-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
websocket server serving url request (or static files) #58
Comments
Hi!, the component does not serve HTTP content. You may want to take a look to HttpListener. The only thing is that you will need to run the websocket server and the http server in different ports. Cheers. |
from your wiki,
|
I think you have seen the part about custom HTTP negotiation, but it is only to hook some logic in case you want to check for example headers like You will get nothing. The websocket protocol uses HTTP only for connection establishment and after that it uses its own binary protocol. Even if the browser tries to open a ws connection to the url you put in image.src, it won't try to send a message. |
it still would be really nice to add really simple http communication, for example it could be added like this: |
I understand it is something that seems convenient, but definitely this is something I won't add, since it goes beyond the WebSocket spec. Cheers. |
node.js is giving actually :static file serving and stream |
@ellLazar: I was looking for a C# WebSocket server that also had a minimal HTTP server to serve a single-page web app and ended up using https://github.com/sensaura-public/iotweb. Unfortunately, its API does not use async/await (which is why I'd have preferred WebSocketListener). |
I also asked this qeustion, on other site |
how the web socket serving static files (URL) ? means:
in client javascript:
image.src=url1 ;
websocket server:
getting the url1 request, and sending back to client the binary image.
I tested your vtortola websocket with strings,on concurrent users,
it worked perfectly.
any code sample, or link will be appreciated.
The text was updated successfully, but these errors were encountered: