diff options
author | Loïc Hoguin <[email protected]> | 2016-08-29 12:39:49 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-08-29 12:40:03 +0200 |
commit | c807880f7ac73f813b2660ea81a00f7712a4e793 (patch) | |
tree | ba1d09e9b177f230665a80513b33fbd532000ce4 /_build/static/archives/extend/attachments/20150623/69dfc8e4/attachment-0001.html | |
parent | b1df25a7d9cda697513650659b781b55b40898f8 (diff) | |
download | ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.gz ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.tar.bz2 ninenines.eu-c807880f7ac73f813b2660ea81a00f7712a4e793.zip |
Add old mailing list archives
Diffstat (limited to '_build/static/archives/extend/attachments/20150623/69dfc8e4/attachment-0001.html')
-rw-r--r-- | _build/static/archives/extend/attachments/20150623/69dfc8e4/attachment-0001.html | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/_build/static/archives/extend/attachments/20150623/69dfc8e4/attachment-0001.html b/_build/static/archives/extend/attachments/20150623/69dfc8e4/attachment-0001.html new file mode 100644 index 00000000..afae15ff --- /dev/null +++ b/_build/static/archives/extend/attachments/20150623/69dfc8e4/attachment-0001.html @@ -0,0 +1,4 @@ +<tt> +<div dir="ltr">hello,<br><br>First of all I would say I am a beginner in Cowboy web server, so probably I made something wrong, that is why I got the "fault", what I got.<br><br>I would like to build up web page, where the client can communicate to server, and server can do the same to client, if client does not send anything to server too. The Cowboy has the websocket example, what does what I would like to do.<br><br>There is only one thing is missing what I would like to have. This is the "frameset". My idea is to build the index.html using framsets. I made this changes, and I build up the html files for the frames, and of course I set these in the index.html. <br><br>Here is how the index.html looks like<br> <html><br><br> <head><br> <title>Welcome to Websocket example 2</title><br> </head><br><br> <frameset rows="64,*"><br> <frame name="top_frame" noresize="noresize" scrolling="no" src="frame_top.html"><br> <frameset cols="450,*"><br> <frame name="left_frame" scrolling="auto" src="frame_left.html"><br> <frame name="right_frame" src="frame_right.html"><br> </frameset><br> <noframes><br> <body><br><br> </body><br> </noframes><br> </frameset><br><br> </html><br><br>This is how the priv folder looks like<br>-----------------------------------------------------------<br> ls priv/<br> frame_left.html frame_right.html frame_top.html index.html static<br><br>This is how I changed the websocket_2_app:start/2 function<br>-----------------------------------------------------------<br> Dispatch = cowboy_router:compile([<br> {'_', [<br> <br> {"/", cowboy_static, {priv_file, websocket_2, "index.html"}},<br> {"/[...]", cowboy_static, {priv_dir, websocket_2, ""}},<br> <br> {"/websocket_2", ws_handler_2, []},<br> {"/static/[...]", cowboy_static, {priv_dir, websocket_2, "static"}}<br> ]}<br> ]),<br><br>After compile and make release package of the app, I can reach the webserver on the port 8080, but some connection does not set up correctly. The following texts are present in the browser<br> DISCONNECTED<br><br> ERROR: undefined<br><br> Connecting to: ws://localhost:8080/websocket_2<br><br>I made a dbg trace on all cowboy modules, to start some kind of troubleshooting. In the "tons" of printout I can see this one. So in the bottom of this, there is an {error,enoent}. It comes when tries connect to the socket. But unfortunatelly I do not have idea what may cause this :-(<br><br>The part of trace<br>-----------------------------------------------------------<br> (<0.177.0>) call cowboy_rest:next({http_req,#Port<0.646>,ranch_tcp,keepalive,<0.177.0>,<<"GET">>,'HTTP/1.1',<br> {{127,0,0,1},33241},<br> <<"localhost">>,undefined,8080,<<"/websocket_2">>,<br> [<<"websocket_2">>],<br> <<>>,undefined,[],<br> [{<<"host">>,<<"localhost:8080">>},<br> {<<"connection">>,<<"Upgrade">>},<br> {<<"pragma">>,<<"no-cache">>},<br> {<<"cache-control">>,<<"no-cache">>},<br> {<<"upgrade">>,<<"websocket">>},<br> {<<"origin">>,<<"<a href="http://localhost:8080">http://localhost:8080</a>">>},<br> {<<"sec-websocket-version">>,<<"13">>},<br> {<<"user-agent">>,<br> <<"Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36">>},<br> {<<"accept-encoding">>,<<"gzip, deflate, sdch">>},<br> {<<"accept-language">>,<<"en-US,en;q=0.8">>},<br> {<<"sec-websocket-key">>,<<"by/gwaQvb/51W7Wa9zrGQg==">>},<br> {<<"sec-websocket-extensions">>,<br> <<"permessage-deflate; client_max_window_bits">>}],<br> [{<<"connection">>,[<<"upgrade">>]}],<br> undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,undefined},{state,[{handler,cowboy_static},<br> {handler_opts,{priv_dir,websocket_2,[]}},<br> {listener,http},<br> {dispatch,[{'_',[],<br> [{[],[],cowboy_static,<br> {priv_file,websocket_2,"index.html"}},<br> {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}},<br> {[<<"websocket_2">>],[],ws_handler_2,[]},<br> {[<<"static">>,'...'],<br> [],cowboy_static,<br> {priv_dir,websocket_2,"static"}}]}]}],<br> <<"GET">>,cowboy_static,<br> {<<"/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2">>,<br> {error,enoent},<br> []},<br> undefined,[],undefined,[],undefined,[],undefined,false,undefined,<br> undefined,undefined},#Fun<cowboy_rest.2.41839999>) (Timestamp: {1435,<br> 46126,<br> 935663})<br><br>I guess, I did something very wrong, but I did not found what is that, thus I would like to get some help from you.<br><br>Please find my small project in github: <a href="https://github.com/ethrbh/websocket_2">https://github.com/ethrbh/websocket_2</a><br><br>thanks for your help,<br>/Robi<br><br></div>
<br> + +</tt> |