summaryrefslogblamecommitdiffstats
path: root/archives/extend/2015-June/000539.html
blob: aab2d33036325db0fb7e9970dc94d85befba5bf2 (plain) (tree)
















































































































































































































































































































































                                                                                                                                                                                                                                     
<!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=%3CCAA4OwwVkzpDwMG0MBHS3z6R6FVzXwKfj7YxDa5RUBch-ExJf9Q%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="000538.html">
   <LINK REL="Next"  HREF="000540.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=%3CCAA4OwwVkzpDwMG0MBHS3z6R6FVzXwKfj7YxDa5RUBch-ExJf9Q%40mail.gmail.com%3E"
       TITLE="[99s-extend] Help to use frameset in index.html">ethrbh at gmail.com
       </A><BR>
    <I>Tue Jun 23 11:15:05 CEST 2015</I>
    <P><UL>
        <LI>Previous message: <A HREF="000538.html">[99s-extend] Help to use frameset in index.html
</A></li>
        <LI>Next message: <A HREF="000540.html">[99s-extend] Websocket vs. Request-Response msg pair
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#539">[ date ]</a>
              <a href="thread.html#539">[ thread ]</a>
              <a href="subject.html#539">[ subject ]</a>
              <a href="author.html#539">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>hello,

I would like to thanks for both of you the grate support.

thanks again,
/Robi

2015-06-23 11:12 GMT+02:00 Lo&#239;c Hoguin &lt;<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A>&gt;:

&gt;<i> I've opened a ticket to remember so something will be done eventually.
</I>&gt;<i> Thanks for helping!
</I>&gt;<i>
</I>&gt;<i> On 06/23/2015 11:11 AM, Graham Hay wrote:
</I>&gt;<i>
</I>&gt;&gt;<i> It's bitten me a few times :(
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> On 23 June 2015 at 10:09, Lo&#239;c Hoguin &lt;<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A>
</I>&gt;&gt;<i> &lt;mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A>&gt;&gt; wrote:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>     Oh nice catch ahah. We should probably warn when something like this
</I>&gt;&gt;<i>     happens.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>     On 06/23/2015 11:06 AM, Graham Hay wrote:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>         I think the order of your routes is the problem, try putting
</I>&gt;&gt;<i>         this line
</I>&gt;&gt;<i>         &lt;
</I>&gt;&gt;<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>&gt;&gt;<i> &gt;
</I>&gt;&gt;<i>         last.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>         On 23 June 2015 at 09:56, Lo&#239;c Hoguin &lt;<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A>
</I>&gt;&gt;<i>         &lt;mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A>&gt;
</I>&gt;&gt;<i>         &lt;mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A> &lt;mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">essen at ninenines.eu</A>&gt;&gt;&gt; wrote:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>              The {error, enoent}, especially there, is probably just
</I>&gt;&gt;<i>         because the
</I>&gt;&gt;<i>              browser is trying to fetch the favicon.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>              Your issue is that Websocket won't connect, so it has
</I>&gt;&gt;<i>         nothing to do
</I>&gt;&gt;<i>              with cowboy_rest. Try tracing cowboy_websocket or enable
</I>&gt;&gt;<i>         SASL to
</I>&gt;&gt;<i>              have more info.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>              On 06/23/2015 10:28 AM, Robert Balogh wrote:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  hello,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  First of all I would say I am a beginner in Cowboy web
</I>&gt;&gt;<i>         server, so
</I>&gt;&gt;<i>                  probably I made something wrong, that is why I got the
</I>&gt;&gt;<i>         &quot;fault&quot;,
</I>&gt;&gt;<i>                  what I got.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  I would like to build up web page, where the client can
</I>&gt;&gt;<i>                  communicate to
</I>&gt;&gt;<i>                  server, and server can do the same to client, if client
</I>&gt;&gt;<i>         does not
</I>&gt;&gt;<i>                  send
</I>&gt;&gt;<i>                  anything to server too. The Cowboy has the websocket
</I>&gt;&gt;<i>         example,
</I>&gt;&gt;<i>                  what does
</I>&gt;&gt;<i>                  what I would like to do.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  There is only one thing is missing what I would like to
</I>&gt;&gt;<i>         have.
</I>&gt;&gt;<i>                  This is
</I>&gt;&gt;<i>                  the &quot;frameset&quot;. My idea is to build the index.html
</I>&gt;&gt;<i>         using framsets. I
</I>&gt;&gt;<i>                  made this changes, and I build up the html files for
</I>&gt;&gt;<i>         the frames,
</I>&gt;&gt;<i>                  and of
</I>&gt;&gt;<i>                  course I set these in the index.html.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  Here is how the index.html looks like
</I>&gt;&gt;<i>                        &lt;html&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                        &lt;head&gt;
</I>&gt;&gt;<i>                        &lt;title&gt;Welcome to Websocket example 2&lt;/title&gt;
</I>&gt;&gt;<i>                        &lt;/head&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                        &lt;frameset rows=&quot;64,*&quot;&gt;
</I>&gt;&gt;<i>                            &lt;frame name=&quot;top_frame&quot; noresize=&quot;noresize&quot;
</I>&gt;&gt;<i>         scrolling=&quot;no&quot;
</I>&gt;&gt;<i>                  src=&quot;frame_top.html&quot;&gt;
</I>&gt;&gt;<i>                            &lt;frameset cols=&quot;450,*&quot;&gt;
</I>&gt;&gt;<i>                                &lt;frame name=&quot;left_frame&quot; scrolling=&quot;auto&quot;
</I>&gt;&gt;<i>                  src=&quot;frame_left.html&quot;&gt;
</I>&gt;&gt;<i>                                &lt;frame name=&quot;right_frame&quot;
</I>&gt;&gt;<i>         src=&quot;frame_right.html&quot;&gt;
</I>&gt;&gt;<i>                            &lt;/frameset&gt;
</I>&gt;&gt;<i>                            &lt;noframes&gt;
</I>&gt;&gt;<i>                            &lt;body&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                            &lt;/body&gt;
</I>&gt;&gt;<i>                            &lt;/noframes&gt;
</I>&gt;&gt;<i>                        &lt;/frameset&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                        &lt;/html&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  This is how the priv folder looks like
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>  -----------------------------------------------------------
</I>&gt;&gt;<i>                        ls priv/
</I>&gt;&gt;<i>                        frame_left.html  frame_right.html  frame_top.html
</I>&gt;&gt;<i>                  index.html  static
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  This is how I changed the websocket_2_app:start/2
</I>&gt;&gt;<i> function
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>  -----------------------------------------------------------
</I>&gt;&gt;<i>                        Dispatch = cowboy_router:compile([
</I>&gt;&gt;<i>                            {'_', [
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                                {&quot;/&quot;, cowboy_static, {priv_file,
</I>&gt;&gt;<i> websocket_2,
</I>&gt;&gt;<i>                  &quot;index.html&quot;}},
</I>&gt;&gt;<i>                                {&quot;/[...]&quot;, cowboy_static, {priv_dir,
</I>&gt;&gt;<i>         websocket_2,
</I>&gt;&gt;<i>                  &quot;&quot;}},
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                                {&quot;/websocket_2&quot;, ws_handler_2, []},
</I>&gt;&gt;<i>                                {&quot;/static/[...]&quot;, cowboy_static, {priv_dir,
</I>&gt;&gt;<i>                  websocket_2,
</I>&gt;&gt;<i>                  &quot;static&quot;}}
</I>&gt;&gt;<i>                            ]}
</I>&gt;&gt;<i>                        ]),
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  After compile and make release package of the app, I
</I>&gt;&gt;<i>         can reach the
</I>&gt;&gt;<i>                  webserver on the port 8080, but some connection does
</I>&gt;&gt;<i>         not set up
</I>&gt;&gt;<i>                  correctly. The following texts are present in the browser
</I>&gt;&gt;<i>                        DISCONNECTED
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                        ERROR: undefined
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                        Connecting to: <A HREF="ws://localhost:8080/websocket_2">ws://localhost:8080/websocket_2</A>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  I made a dbg trace on all cowboy modules, to start some
</I>&gt;&gt;<i>         kind of
</I>&gt;&gt;<i>                  troubleshooting. In the &quot;tons&quot; of printout I can see
</I>&gt;&gt;<i>         this one.
</I>&gt;&gt;<i>                  So in the
</I>&gt;&gt;<i>                  bottom of this, there is an {error,enoent}. It comes
</I>&gt;&gt;<i>         when tries
</I>&gt;&gt;<i>                  connect
</I>&gt;&gt;<i>                  to the socket. But unfortunatelly I do not have idea
</I>&gt;&gt;<i>         what may
</I>&gt;&gt;<i>                  cause this :-(
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  The part of trace
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>  -----------------------------------------------------------
</I>&gt;&gt;<i>                        (&lt;0.177.0&gt;) call
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> 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',
</I>&gt;&gt;<i>                                  {{127,0,0,1},33241},
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>         &lt;&lt;&quot;localhost&quot;&gt;&gt;,undefined,8080,&lt;&lt;&quot;/websocket_2&quot;&gt;&gt;,
</I>&gt;&gt;<i>                                  [&lt;&lt;&quot;websocket_2&quot;&gt;&gt;],
</I>&gt;&gt;<i>                                  &lt;&lt;&gt;&gt;,undefined,[],
</I>&gt;&gt;<i>                                  [{&lt;&lt;&quot;host&quot;&gt;&gt;,&lt;&lt;&quot;localhost:8080&quot;&gt;&gt;},
</I>&gt;&gt;<i>                                   {&lt;&lt;&quot;connection&quot;&gt;&gt;,&lt;&lt;&quot;Upgrade&quot;&gt;&gt;},
</I>&gt;&gt;<i>                                   {&lt;&lt;&quot;pragma&quot;&gt;&gt;,&lt;&lt;&quot;no-cache&quot;&gt;&gt;},
</I>&gt;&gt;<i>                                   {&lt;&lt;&quot;cache-control&quot;&gt;&gt;,&lt;&lt;&quot;no-cache&quot;&gt;&gt;},
</I>&gt;&gt;<i>                                   {&lt;&lt;&quot;upgrade&quot;&gt;&gt;,&lt;&lt;&quot;websocket&quot;&gt;&gt;},
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>           {&lt;&lt;&quot;origin&quot;&gt;&gt;,&lt;&lt;&quot;<A HREF="http://localhost:8080">http://localhost:8080</A>&quot;&gt;&gt;},
</I>&gt;&gt;<i>                                   {&lt;&lt;&quot;sec-websocket-version&quot;&gt;&gt;,&lt;&lt;&quot;13&quot;&gt;&gt;},
</I>&gt;&gt;<i>                                   {&lt;&lt;&quot;user-agent&quot;&gt;&gt;,
</I>&gt;&gt;<i>                                    &lt;&lt;&quot;Mozilla/5.0 (X11; Linux i686)
</I>&gt;&gt;<i>                  AppleWebKit/537.36
</I>&gt;&gt;<i>                  (KHTML, like Gecko) Chrome/40.0.2214.115
</I>&gt;&gt;<i> Safari/537.36&quot;&gt;&gt;},
</I>&gt;&gt;<i>                                   {&lt;&lt;&quot;accept-encoding&quot;&gt;&gt;,&lt;&lt;&quot;gzip,
</I>&gt;&gt;<i>         deflate, sdch&quot;&gt;&gt;},
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>           {&lt;&lt;&quot;accept-language&quot;&gt;&gt;,&lt;&lt;&quot;en-US,en;q=0.8&quot;&gt;&gt;},
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  {&lt;&lt;&quot;sec-websocket-key&quot;&gt;&gt;,&lt;&lt;&quot;by/gwaQvb/51W7Wa9zrGQg==&quot;&gt;&gt;},
</I>&gt;&gt;<i>                                   {&lt;&lt;&quot;sec-websocket-extensions&quot;&gt;&gt;,
</I>&gt;&gt;<i>                                    &lt;&lt;&quot;permessage-deflate;
</I>&gt;&gt;<i>                  client_max_window_bits&quot;&gt;&gt;}],
</I>&gt;&gt;<i>                                  [{&lt;&lt;&quot;connection&quot;&gt;&gt;,[&lt;&lt;&quot;upgrade&quot;&gt;&gt;]}],
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> undefined,[],waiting,&lt;&lt;&gt;&gt;,undefined,false,waiting,[],&lt;&lt;&gt;&gt;,undefined},{state,[{handler,cowboy_static},
</I>&gt;&gt;<i>                                {handler_opts,{priv_dir,websocket_2,[]}},
</I>&gt;&gt;<i>                                {listener,http},
</I>&gt;&gt;<i>                                {dispatch,[{'_',[],
</I>&gt;&gt;<i>                                                [{[],[],cowboy_static,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                    {priv_file,websocket_2,&quot;index.html&quot;}},
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                     {['...'],[],cowboy_static,{priv_dir,websocket_2,[]}},
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  {[&lt;&lt;&quot;websocket_2&quot;&gt;&gt;],[],ws_handler_2,[]},
</I>&gt;&gt;<i>                                                 {[&lt;&lt;&quot;static&quot;&gt;&gt;,'...'],
</I>&gt;&gt;<i>                                                  [],cowboy_static,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                    {priv_dir,websocket_2,&quot;static&quot;}}]}]}],
</I>&gt;&gt;<i>                               &lt;&lt;&quot;GET&quot;&gt;&gt;,cowboy_static,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> {&lt;&lt;&quot;/home/ethrbh/projects/github/websocket_2/_rel/websocket_2/lib/websocket_2-1/priv/websocket_2&quot;&gt;&gt;,
</I>&gt;&gt;<i>                                {error,enoent},
</I>&gt;&gt;<i>                                []},
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>         undefined,[],undefined,[],undefined,[],undefined,false,undefined,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>           undefined,undefined},#Fun&lt;cowboy_rest.2.41839999&gt;)
</I>&gt;&gt;<i>                  (Timestamp: {1435,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                       46126,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                       935663})
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  I guess, I did something very wrong, but I did not
</I>&gt;&gt;<i>         found what is
</I>&gt;&gt;<i>                  that,
</I>&gt;&gt;<i>                  thus I would like to get some help from you.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  Please find my small project in github:
</I>&gt;&gt;<i>         <A HREF="https://github.com/ethrbh/websocket_2">https://github.com/ethrbh/websocket_2</A>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  thanks for your help,
</I>&gt;&gt;<i>                  /Robi
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>                  _______________________________________________
</I>&gt;&gt;<i>                  Extend mailing list
</I>&gt;&gt;<i>         <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A> &lt;mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>&gt;
</I>&gt;&gt;<i>         &lt;mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>
</I>&gt;&gt;<i>         &lt;mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>&gt;&gt;
</I>&gt;&gt;<i>         <A HREF="https://lists.ninenines.eu/listinfo/extend">https://lists.ninenines.eu/listinfo/extend</A>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>              --
</I>&gt;&gt;<i>              Lo&#239;c Hoguin
</I>&gt;&gt;<i>         <A HREF="http://ninenines.eu">http://ninenines.eu</A>
</I>&gt;&gt;<i>              Author of The Erlanger Playbook,
</I>&gt;&gt;<i>              A book about software development using Erlang
</I>&gt;&gt;<i>              _______________________________________________
</I>&gt;&gt;<i>              Extend mailing list
</I>&gt;&gt;<i>         <A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A> &lt;mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>&gt;
</I>&gt;&gt;<i>         &lt;mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>
</I>&gt;&gt;<i>         &lt;mailto:<A HREF="https://lists.ninenines.eu/listinfo/extend">Extend at lists.ninenines.eu</A>&gt;&gt;
</I>&gt;&gt;<i>         <A HREF="https://lists.ninenines.eu/listinfo/extend">https://lists.ninenines.eu/listinfo/extend</A>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>     --
</I>&gt;&gt;<i>     Lo&#239;c Hoguin
</I>&gt;&gt;<i>     <A HREF="http://ninenines.eu">http://ninenines.eu</A>
</I>&gt;&gt;<i>     Author of The Erlanger Playbook,
</I>&gt;&gt;<i>     A book about software development using Erlang
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;<i> --
</I>&gt;<i> Lo&#239;c Hoguin
</I>&gt;<i> <A HREF="http://ninenines.eu">http://ninenines.eu</A>
</I>&gt;<i> Author of The Erlanger Playbook,
</I>&gt;<i> A book about software development using Erlang
</I>&gt;<i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: &lt;<A HREF="http://lists.ninenines.eu/archives/extend/attachments/20150623/f7c19f68/attachment-0001.html">http://lists.ninenines.eu/archives/extend/attachments/20150623/f7c19f68/attachment-0001.html</A>&gt;
</PRE>


<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000538.html">[99s-extend] Help to use frameset in index.html
</A></li>
	<LI>Next message: <A HREF="000540.html">[99s-extend] Websocket vs. Request-Response msg pair
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#539">[ date ]</a>
              <a href="thread.html#539">[ thread ]</a>
              <a href="subject.html#539">[ subject ]</a>
              <a href="author.html#539">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://lists.ninenines.eu/listinfo/extend">More information about the Extend
mailing list</a><br>
</body></html>