diff options
Diffstat (limited to 'archives/extend/2015-June/000538.html')
-rw-r--r-- | archives/extend/2015-June/000538.html | 312 |
1 files changed, 312 insertions, 0 deletions
diff --git a/archives/extend/2015-June/000538.html b/archives/extend/2015-June/000538.html new file mode 100644 index 00000000..b7079e06 --- /dev/null +++ b/archives/extend/2015-June/000538.html @@ -0,0 +1,312 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<HTML> + <HEAD> + <TITLE> [99s-extend] Help to use frameset in index.html + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Help%20to%20use%20frameset%20in%20index.html&In-Reply-To=%3C55892318.2080507%40ninenines.eu%3E"> + <META NAME="robots" CONTENT="index,nofollow"> + <style type="text/css"> + pre { + white-space: pre-wrap; /* css-2.1, curent FF, Opera, Safari */ + } + </style> + <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <LINK REL="Previous" HREF="000537.html"> + <LINK REL="Next" HREF="000539.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[99s-extend] Help to use frameset in index.html</H1> + <B>Loïc Hoguin</B> + <A HREF="mailto:extend%40lists.ninenines.eu?Subject=Re%3A%20%5B99s-extend%5D%20Help%20to%20use%20frameset%20in%20index.html&In-Reply-To=%3C55892318.2080507%40ninenines.eu%3E" + TITLE="[99s-extend] Help to use frameset in index.html">essen at ninenines.eu + </A><BR> + <I>Tue Jun 23 11:12:56 CEST 2015</I> + <P><UL> + <LI>Previous message: <A HREF="000537.html">[99s-extend] Help to use frameset in index.html +</A></li> + <LI>Next message: <A HREF="000539.html">[99s-extend] Help to use frameset in index.html +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#538">[ date ]</a> + <a href="thread.html#538">[ thread ]</a> + <a href="subject.html#538">[ subject ]</a> + <a href="author.html#538">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>I've opened a ticket to remember so something will be done eventually. +Thanks for helping! + +On 06/23/2015 11:11 AM, Graham Hay wrote: +><i> It's bitten me a few times :( +</I>><i> +</I>><i> On 23 June 2015 at 10:09, Loïc Hoguin <<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A> +</I>><i> <mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A>>> wrote: +</I>><i> +</I>><i> Oh nice catch ahah. We should probably warn when something like this +</I>><i> happens. +</I>><i> +</I>><i> On 06/23/2015 11:06 AM, Graham Hay wrote: +</I>><i> +</I>><i> I think the order of your routes is the problem, try putting +</I>><i> this line +</I>><i> <<A HREF="https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17">https://github.com/ethrbh/websocket_2/blob/master/src/websocket_2_app.erl#L17</A>> +</I>><i> last. +</I>><i> +</I>><i> On 23 June 2015 at 09:56, Loïc Hoguin <<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A> +</I>><i> <mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A>> +</I>><i> <mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A> <mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A>>>> wrote: +</I>><i> +</I>><i> The {error, enoent}, especially there, is probably just +</I>><i> because the +</I>><i> browser is trying to fetch the favicon. +</I>><i> +</I>><i> Your issue is that Websocket won't connect, so it has +</I>><i> nothing to do +</I>><i> with cowboy_rest. Try tracing cowboy_websocket or enable +</I>><i> SASL to +</I>><i> have more info. +</I>><i> +</I>><i> +</I>><i> On 06/23/2015 10:28 AM, Robert Balogh wrote: +</I>><i> +</I>><i> hello, +</I>><i> +</I>><i> First of all I would say I am a beginner in Cowboy web +</I>><i> server, so +</I>><i> probably I made something wrong, that is why I got the +</I>><i> "fault", +</I>><i> what I got. +</I>><i> +</I>><i> I would like to build up web page, where the client can +</I>><i> communicate to +</I>><i> server, and server can do the same to client, if client +</I>><i> does not +</I>><i> send +</I>><i> anything to server too. The Cowboy has the websocket +</I>><i> example, +</I>><i> what does +</I>><i> what I would like to do. +</I>><i> +</I>><i> There is only one thing is missing what I would like to +</I>><i> have. +</I>><i> This is +</I>><i> the "frameset". My idea is to build the index.html +</I>><i> using framsets. I +</I>><i> made this changes, and I build up the html files for +</I>><i> the frames, +</I>><i> and of +</I>><i> course I set these in the index.html. +</I>><i> +</I>><i> Here is how the index.html looks like +</I>><i> <html> +</I>><i> +</I>><i> <head> +</I>><i> <title>Welcome to Websocket example 2</title> +</I>><i> </head> +</I>><i> +</I>><i> <frameset rows="64,*"> +</I>><i> <frame name="top_frame" noresize="noresize" +</I>><i> scrolling="no" +</I>><i> src="frame_top.html"> +</I>><i> <frameset cols="450,*"> +</I>><i> <frame name="left_frame" scrolling="auto" +</I>><i> src="frame_left.html"> +</I>><i> <frame name="right_frame" +</I>><i> src="frame_right.html"> +</I>><i> </frameset> +</I>><i> <noframes> +</I>><i> <body> +</I>><i> +</I>><i> </body> +</I>><i> </noframes> +</I>><i> </frameset> +</I>><i> +</I>><i> </html> +</I>><i> +</I>><i> This is how the priv folder looks like +</I>><i> ----------------------------------------------------------- +</I>><i> ls priv/ +</I>><i> frame_left.html frame_right.html frame_top.html +</I>><i> index.html static +</I>><i> +</I>><i> This is how I changed the websocket_2_app:start/2 function +</I>><i> ----------------------------------------------------------- +</I>><i> Dispatch = cowboy_router:compile([ +</I>><i> {'_', [ +</I>><i> +</I>><i> {"/", cowboy_static, {priv_file, websocket_2, +</I>><i> "index.html"}}, +</I>><i> {"/[...]", cowboy_static, {priv_dir, +</I>><i> websocket_2, +</I>><i> ""}}, +</I>><i> +</I>><i> {"/websocket_2", ws_handler_2, []}, +</I>><i> {"/static/[...]", cowboy_static, {priv_dir, +</I>><i> websocket_2, +</I>><i> "static"}} +</I>><i> ]} +</I>><i> ]), +</I>><i> +</I>><i> After compile and make release package of the app, I +</I>><i> can reach the +</I>><i> webserver on the port 8080, but some connection does +</I>><i> not set up +</I>><i> correctly. The following texts are present in the browser +</I>><i> DISCONNECTED +</I>><i> +</I>><i> ERROR: undefined +</I>><i> +</I>><i> Connecting to: <A HREF="ws://localhost:8080/websocket_2">ws://localhost:8080/websocket_2</A> +</I>><i> +</I>><i> I made a dbg trace on all cowboy modules, to start some +</I>><i> kind of +</I>><i> troubleshooting. In the "tons" of printout I can see +</I>><i> this one. +</I>><i> So in the +</I>><i> bottom of this, there is an {error,enoent}. It comes +</I>><i> when tries +</I>><i> connect +</I>><i> to the socket. But unfortunatelly I do not have idea +</I>><i> what may +</I>><i> cause this :-( +</I>><i> +</I>><i> The part of trace +</I>><i> ----------------------------------------------------------- +</I>><i> (<0.177.0>) call +</I>><i> +</I>><i> cowboy_rest:next({http_req,#Port<0.646>,ranch_tcp,keepalive,<0.177.0>,<<"GET">>,'HTTP/1.1', +</I>><i> {{127,0,0,1},33241}, +</I>><i> +</I>><i> <<"localhost">>,undefined,8080,<<"/websocket_2">>, +</I>><i> [<<"websocket_2">>], +</I>><i> <<>>,undefined,[], +</I>><i> [{<<"host">>,<<"localhost:8080">>}, +</I>><i> {<<"connection">>,<<"Upgrade">>}, +</I>><i> {<<"pragma">>,<<"no-cache">>}, +</I>><i> {<<"cache-control">>,<<"no-cache">>}, +</I>><i> {<<"upgrade">>,<<"websocket">>}, +</I>><i> +</I>><i> {<<"origin">>,<<"<A HREF="http://localhost:8080">http://localhost:8080</A>">>}, +</I>><i> {<<"sec-websocket-version">>,<<"13">>}, +</I>><i> {<<"user-agent">>, +</I>><i> <<"Mozilla/5.0 (X11; Linux i686) +</I>><i> AppleWebKit/537.36 +</I>><i> (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36">>}, +</I>><i> {<<"accept-encoding">>,<<"gzip, +</I>><i> deflate, sdch">>}, +</I>><i> +</I>><i> {<<"accept-language">>,<<"en-US,en;q=0.8">>}, +</I>><i> +</I>><i> {<<"sec-websocket-key">>,<<"by/gwaQvb/51W7Wa9zrGQg==">>}, +</I>><i> {<<"sec-websocket-extensions">>, +</I>><i> <<"permessage-deflate; +</I>><i> client_max_window_bits">>}], +</I>><i> [{<<"connection">>,[<<"upgrade">>]}], +</I>><i> +</I>><i> +</I>><i> undefined,[],waiting,<<>>,undefined,false,waiting,[],<<>>,undefined},{state,[{handler,cowboy_static}, +</I>><i> {handler_opts,{priv_dir,websocket_2,[]}}, +</I>><i> {listener,http}, +</I>><i> {dispatch,[{'_',[], +</I>><i> [{[],[],cowboy_static, +</I>><i> +</I>><i> {priv_file,websocket_2,"index.html"}}, +</I>><i> +</I>><i> {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}}, +</I>><i> +</I>><i> {[<<"websocket_2">>],[],ws_handler_2,[]}, +</I>><i> {[<<"static">>,'...'], +</I>><i> [],cowboy_static, +</I>><i> +</I>><i> {priv_dir,websocket_2,"static"}}]}]}], +</I>><i> <<"GET">>,cowboy_static, +</I>><i> +</I>><i> +</I>><i> {<<"/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2">>, +</I>><i> {error,enoent}, +</I>><i> []}, +</I>><i> +</I>><i> +</I>><i> undefined,[],undefined,[],undefined,[],undefined,false,undefined, +</I>><i> +</I>><i> undefined,undefined},#Fun<cowboy_rest.2.41839999>) +</I>><i> (Timestamp: {1435, +</I>><i> +</I>><i> 46126, +</I>><i> +</I>><i> 935663}) +</I>><i> +</I>><i> I guess, I did something very wrong, but I did not +</I>><i> found what is +</I>><i> that, +</I>><i> thus I would like to get some help from you. +</I>><i> +</I>><i> Please find my small project in github: +</I>><i> <A HREF="https://github.com/ethrbh/websocket_2">https://github.com/ethrbh/websocket_2</A> +</I>><i> +</I>><i> thanks for your help, +</I>><i> /Robi +</I>><i> +</I>><i> +</I>><i> +</I>><i> _______________________________________________ +</I>><i> Extend mailing list +</I>><i> <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A> <mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>> +</I>><i> <mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A> +</I>><i> <mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>>> +</I>><i> <A HREF="https://lists.ninenines.eu/listinfo/extend">https://lists.ninenines.eu/listinfo/extend</A> +</I>><i> +</I>><i> +</I>><i> -- +</I>><i> Loïc Hoguin +</I>><i> <A HREF="http://ninenines.eu">http://ninenines.eu</A> +</I>><i> Author of The Erlanger Playbook, +</I>><i> A book about software development using Erlang +</I>><i> _______________________________________________ +</I>><i> Extend mailing list +</I>><i> <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A> <mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>> +</I>><i> <mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A> +</I>><i> <mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>>> +</I>><i> <A HREF="https://lists.ninenines.eu/listinfo/extend">https://lists.ninenines.eu/listinfo/extend</A> +</I>><i> +</I>><i> +</I>><i> +</I>><i> -- +</I>><i> Loïc Hoguin +</I>><i> <A HREF="http://ninenines.eu">http://ninenines.eu</A> +</I>><i> Author of The Erlanger Playbook, +</I>><i> A book about software development using Erlang +</I>><i> +</I>><i> +</I> +-- +Loïc Hoguin +<A HREF="http://ninenines.eu">http://ninenines.eu</A> +Author of The Erlanger Playbook, +A book about software development using Erlang +</PRE> + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="000537.html">[99s-extend] Help to use frameset in index.html +</A></li> + <LI>Next message: <A HREF="000539.html">[99s-extend] Help to use frameset in index.html +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#538">[ date ]</a> + <a href="thread.html#538">[ thread ]</a> + <a href="subject.html#538">[ subject ]</a> + <a href="author.html#538">[ author ]</a> + </LI> + </UL> + +<hr> +<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend +mailing list</a><br> +</body></html> |