summaryrefslogtreecommitdiffstats
path: root/archives/extend/2015-June/000532.html
diff options
context:
space:
mode:
Diffstat (limited to 'archives/extend/2015-June/000532.html')
-rw-r--r--archives/extend/2015-June/000532.html193
1 files changed, 193 insertions, 0 deletions
diff --git a/archives/extend/2015-June/000532.html b/archives/extend/2015-June/000532.html
new file mode 100644
index 00000000..c1578254
--- /dev/null
+++ b/archives/extend/2015-June/000532.html
@@ -0,0 +1,193 @@
+<!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=%3CCAA4OwwXgav5U-uXnHqfQ6LkPyeMBuo_3Rw68ORh4NMVHN2_uxA%40mail.gmail.com%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="000531.html">
+ <LINK REL="Next" HREF="000533.html">
+ </HEAD>
+ <BODY BGCOLOR="#ffffff">
+ <H1>[99s-extend] Help to use frameset in index.html</H1>
+ <B>Robert Balogh</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=%3CCAA4OwwXgav5U-uXnHqfQ6LkPyeMBuo_3Rw68ORh4NMVHN2_uxA%40mail.gmail.com%3E"
+ TITLE="[99s-extend] Help to use frameset in index.html">ethrbh at gmail.com
+ </A><BR>
+ <I>Tue Jun 23 10:28:16 CEST 2015</I>
+ <P><UL>
+ <LI>Previous message: <A HREF="000531.html">[99s-extend] [ANN] The Erlanger Playbook early release
+</A></li>
+ <LI>Next message: <A HREF="000533.html">[99s-extend] Help to use frameset in index.html
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#532">[ date ]</a>
+ <a href="thread.html#532">[ thread ]</a>
+ <a href="subject.html#532">[ subject ]</a>
+ <a href="author.html#532">[ author ]</a>
+ </LI>
+ </UL>
+ <HR>
+<!--beginarticle-->
+<PRE>hello,
+
+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 &quot;fault&quot;, what I got.
+
+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.
+
+There is only one thing is missing what I would like to have. This is the
+&quot;frameset&quot;. 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.
+
+Here is how the index.html looks like
+ &lt;html&gt;
+
+ &lt;head&gt;
+ &lt;title&gt;Welcome to Websocket example 2&lt;/title&gt;
+ &lt;/head&gt;
+
+ &lt;frameset rows=&quot;64,*&quot;&gt;
+ &lt;frame name=&quot;top_frame&quot; noresize=&quot;noresize&quot; scrolling=&quot;no&quot;
+src=&quot;frame_top.html&quot;&gt;
+ &lt;frameset cols=&quot;450,*&quot;&gt;
+ &lt;frame name=&quot;left_frame&quot; scrolling=&quot;auto&quot; src=&quot;frame_left.html&quot;&gt;
+ &lt;frame name=&quot;right_frame&quot; src=&quot;frame_right.html&quot;&gt;
+ &lt;/frameset&gt;
+ &lt;noframes&gt;
+ &lt;body&gt;
+
+ &lt;/body&gt;
+ &lt;/noframes&gt;
+ &lt;/frameset&gt;
+
+ &lt;/html&gt;
+
+This is how the priv folder looks like
+-----------------------------------------------------------
+ ls priv/
+ frame_left.html frame_right.html frame_top.html index.html static
+
+This is how I changed the websocket_2_app:start/2 function
+-----------------------------------------------------------
+ Dispatch = cowboy_router:compile([
+ {'_', [
+
+ {&quot;/&quot;, cowboy_static, {priv_file, websocket_2, &quot;index.html&quot;}},
+ {&quot;/[...]&quot;, cowboy_static, {priv_dir, websocket_2, &quot;&quot;}},
+
+ {&quot;/websocket_2&quot;, ws_handler_2, []},
+ {&quot;/static/[...]&quot;, cowboy_static, {priv_dir, websocket_2,
+&quot;static&quot;}}
+ ]}
+ ]),
+
+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
+ DISCONNECTED
+
+ ERROR: undefined
+
+ Connecting to: <A HREF="ws://localhost:8080/websocket_2">ws://localhost:8080/websocket_2</A>
+
+I made a dbg trace on all cowboy modules, to start some kind of
+troubleshooting. In the &quot;tons&quot; 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 :-(
+
+The part of trace
+-----------------------------------------------------------
+ (&lt;0.177.0&gt;) call
+cowboy_rest:next({http_req,#Port&lt;0.646&gt;,ranch_tcp,keepalive,&lt;0.177.0&gt;,&lt;&lt;&quot;GET&quot;&gt;&gt;,'HTTP/1.1',
+ {{127,0,0,1},33241},
+ &lt;&lt;&quot;localhost&quot;&gt;&gt;,undefined,8080,&lt;&lt;&quot;/websocket_2&quot;&gt;&gt;,
+ [&lt;&lt;&quot;websocket_2&quot;&gt;&gt;],
+ &lt;&lt;&gt;&gt;,undefined,[],
+ [{&lt;&lt;&quot;host&quot;&gt;&gt;,&lt;&lt;&quot;localhost:8080&quot;&gt;&gt;},
+ {&lt;&lt;&quot;connection&quot;&gt;&gt;,&lt;&lt;&quot;Upgrade&quot;&gt;&gt;},
+ {&lt;&lt;&quot;pragma&quot;&gt;&gt;,&lt;&lt;&quot;no-cache&quot;&gt;&gt;},
+ {&lt;&lt;&quot;cache-control&quot;&gt;&gt;,&lt;&lt;&quot;no-cache&quot;&gt;&gt;},
+ {&lt;&lt;&quot;upgrade&quot;&gt;&gt;,&lt;&lt;&quot;websocket&quot;&gt;&gt;},
+ {&lt;&lt;&quot;origin&quot;&gt;&gt;,&lt;&lt;&quot;<A HREF="http://localhost:8080">http://localhost:8080</A>&quot;&gt;&gt;},
+ {&lt;&lt;&quot;sec-websocket-version&quot;&gt;&gt;,&lt;&lt;&quot;13&quot;&gt;&gt;},
+ {&lt;&lt;&quot;user-agent&quot;&gt;&gt;,
+ &lt;&lt;&quot;Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML,
+like Gecko) Chrome/40.0.2214.115 Safari/537.36&quot;&gt;&gt;},
+ {&lt;&lt;&quot;accept-encoding&quot;&gt;&gt;,&lt;&lt;&quot;gzip, deflate, sdch&quot;&gt;&gt;},
+ {&lt;&lt;&quot;accept-language&quot;&gt;&gt;,&lt;&lt;&quot;en-US,en;q=0.8&quot;&gt;&gt;},
+ {&lt;&lt;&quot;sec-websocket-key&quot;&gt;&gt;,&lt;&lt;&quot;by/gwaQvb/51W7Wa9zrGQg==&quot;&gt;&gt;},
+ {&lt;&lt;&quot;sec-websocket-extensions&quot;&gt;&gt;,
+ &lt;&lt;&quot;permessage-deflate; client_max_window_bits&quot;&gt;&gt;}],
+ [{&lt;&lt;&quot;connection&quot;&gt;&gt;,[&lt;&lt;&quot;upgrade&quot;&gt;&gt;]}],
+
+undefined,[],waiting,&lt;&lt;&gt;&gt;,undefined,false,waiting,[],&lt;&lt;&gt;&gt;,undefined},{state,[{handler,cowboy_static},
+ {handler_opts,{priv_dir,websocket_2,[]}},
+ {listener,http},
+ {dispatch,[{'_',[],
+ [{[],[],cowboy_static,
+ {priv_file,websocket_2,&quot;index.html&quot;}},
+
+ {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}},
+ {[&lt;&lt;&quot;websocket_2&quot;&gt;&gt;],[],ws_handler_2,[]},
+ {[&lt;&lt;&quot;static&quot;&gt;&gt;,'...'],
+ [],cowboy_static,
+ {priv_dir,websocket_2,&quot;static&quot;}}]}]}],
+ &lt;&lt;&quot;GET&quot;&gt;&gt;,cowboy_static,
+
+{&lt;&lt;&quot;/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2&quot;&gt;&gt;,
+ {error,enoent},
+ []},
+ undefined,[],undefined,[],undefined,[],undefined,false,undefined,
+ undefined,undefined},#Fun&lt;cowboy_rest.2.41839999&gt;) (Timestamp:
+{1435,
+
+46126,
+
+935663})
+
+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.
+
+Please find my small project in github:
+<A HREF="https://github.com/ethrbh/websocket_2">https://github.com/ethrbh/websocket_2</A>
+
+thanks for your help,
+/Robi
+-------------- next part --------------
+An HTML attachment was scrubbed...
+URL: &lt;<A HREF="http://lists.ninenines.eu/archives/extend/attachments/20150623/69dfc8e4/attachment-0001.html">http://lists.ninenines.eu/archives/extend/attachments/20150623/69dfc8e4/attachment-0001.html</A>&gt;
+</PRE>
+
+
+<!--endarticle-->
+ <HR>
+ <P><UL>
+ <!--threads-->
+ <LI>Previous message: <A HREF="000531.html">[99s-extend] [ANN] The Erlanger Playbook early release
+</A></li>
+ <LI>Next message: <A HREF="000533.html">[99s-extend] Help to use frameset in index.html
+</A></li>
+ <LI> <B>Messages sorted by:</B>
+ <a href="date.html#532">[ date ]</a>
+ <a href="thread.html#532">[ thread ]</a>
+ <a href="subject.html#532">[ subject ]</a>
+ <a href="author.html#532">[ author ]</a>
+ </LI>
+ </UL>
+
+<hr>
+<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend
+mailing list</a><br>
+</body></html>