[Pianod] web client how to?

Peter Li chinasaurli at gmail.com
Sat Feb 2 18:36:43 PST 2013


Hmm, I'm in the embarrassing position of running this WebSockets thing 
and not really understanding how to use it...  Where do I find the web 
client code that presumably is supposed to connect to this?

I had to make some patches to get wsgw to build on Linux (FC17, 
ArchLinARM).  In brief:
     1) Added make rule so that IP6_CFLAGS is used
     2) Added some includes that seem to be needed
     3) Added libbsd to includes and linking; it didn't seem like there 
was an easy way to get everything working without this...


    Index: Makefile
    ===================================================================
    --- Makefile    (revision 9)
    +++ Makefile    (working copy)
    @@ -54,14 +54,21 @@
          IP6_CFLAGS=
      endif

    +ifeq (${LINUX},0)
    +    LIBBSD_LDFLAGS=-lbsd
    +endif

    +
      # build gateway
      wsgw: ${WSGW_OBJ} ${WSGW_HDR}
          @echo "  LINK  $@"
    -    ${CC} -o $@ ${ARCH} ${WSGW_OBJ} ${LDFLAGS} -lpthread
    ${LIBBSD_LDFLAGS}
    +    ${CC} -o $@ ${ARCH} ${WSGW_OBJ} ${LDFLAGS} ${LIBBSD_LDFLAGS}
    -lpthread ${LIBBSD_LDFLAGS}


    +%.o: %.c
    +    ${CC} ${CFLAGS} ${IP6_CFLAGS} -c -o $@ $<

    +
      clean:
          @echo " CLEAN"
          ${RM} ${WSGW_OBJ} wsgw


    Index: bridge.c
    ===================================================================
    --- bridge.c    (revision 9)
    +++ bridge.c    (working copy)
    @@ -12,7 +12,7 @@
      #define _DARWIN_C_SOURCE /* strdup() on OS X */
      #endif
      #ifdef __linux__
    -#include <linux/posix_types.h>
    +#include <bsd/bsd.h>
      #endif


    Index: logging.c
    ===================================================================
    --- logging.c    (revision 9)
    +++ logging.c    (working copy)
    @@ -5,6 +5,10 @@
       *  Copyright 2012 Devious Fish. All rights reserved.
       */

    +#ifdef __linux__
    +#include <sys/types.h>
    +#endif
    +
      #include <stdio.h>
      #include <time.h>
      #include <stdarg.h>


    Index: wsgw.c
    ===================================================================
    --- wsgw.c    (revision 9)
    +++ wsgw.c    (working copy)
    @@ -12,7 +12,8 @@
      #define _DARWIN_C_SOURCE /* strdup() on OS X */
      #endif
      #ifdef __linux__
    -#include <linux/posix_types.h>
    +#include <bsd/bsd.h>
    +#include <sys/wait.h>
      #endif



On 01/18/2013 06:13 PM, Perette Barella wrote:
> Hi John,
>
> wsgw is available and the client is ready for general use.  For the 
> gateway, those on Raspberry ? will require the DISABLE_IP6=1 make 
> option.  Let us know about any other snags, bugs or other problems.
>
> http://deviousfish.com/Downloads/wsgw
>
> WebSocket availability info: http://caniuse.com/websockets
>
> And I believe Chrome 24 has a bug in masking code, so if you're using 
> Chrome, make sure masking is turned off in the gateway.
>
> Perette

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.deviousfish.com/pipermail/pianod-deviousfish.com/attachments/20130202/a9689882/attachment-0003.htm>


More information about the Pianod mailing list