Comments (4)
On 27/06/2013 17:01, olleharstedt wrote:
Hello
I'm using your library for my card playing webpage (thanks for that)!
Now I try to switch to SSL, but the websocket will no longer connect
(I've also switched from "ws://..." to "wss://..."). This is the error I
receive:Lwt_stream.Empty[Thu Jun 27 12:44:44 2013] [OcamlNet]
/cgi-bin/drakskatten_ajax: Netchannels.Closed_channel (Status 500),
referer: https://127.0.1.2/cgi-bin/drakskattenI'm using the cgi app as a small websocket server, where each instance
listens on a unique port, starting from 8080.Do you know what's going on? Is it apache? Or should I use the Lwt_ssl
socket type instead of the regular?Loading webpages from the cgi works properly, even with SSL. Websocket
works without SSL, but not with.Grateful for your help
Olle
I’m going to have a look tomorrow.
Thanks for your interest in the library :)
Vincent
from lwt-websocket.
Oh, I thought it was MY websocket library. Sorry :)
from lwt-websocket.
Ah, no, not ocaml-websocket, but lwt-websocket. :)
Do you know how to use websockets with SSL? Just switching to "wss://..." doesn't seem enough. This is the setup code I use. Should I use another socket type to get it to work with SSL?
let start_websocket env =
let addr_inet = Unix.ADDR_INET (Unix.inet_addr_of_string env#addr, env#port) in
let sock_listen = Lwt_unix.socket Unix.PF_INET Unix.SOCK_STREAM 0 in
(** setup listen socket *)
Lwt_unix.setsockopt sock_listen Unix.SO_REUSEADDR true;
Lwt_unix.bind sock_listen addr_inet;
Lwt_unix.listen sock_listen 5;
...
Apache2 takes care of the SSL, so I'm at bit of a lost, here.
from lwt-websocket.
On 28/06/2013 15:34, olleharstedt wrote:
It is yours. Not sure where the fault is, though. Do you know how to use websockets with SSL? Just switching to"wss://..." doesn't seem enough.
Ok, you're talking about my fork of this library then. I wrote another
websocket library completely from scratch (ocaml-websocket) that I hope
is working over SSL (not even sure…). I never used this library
actually, I might have a look in some time but I'm currently too busy.
Good luck,
Vincent
from lwt-websocket.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lwt-websocket.