[Libwebsockets] Unable to communicate with node server over Websocket

sthustfo sthustfo at gmail.com
Tue Aug 5 12:07:09 CEST 2014


Hey Andy,

Thanks for the quick response. I am not aware of the compliance status of
socket.io but am trying to find out the same. Meanwhile, here is the client
log with debug level 1023.

-
sthustfo

On Tue, Aug 5, 2014 at 3:29 PM, Andy Green <andy at warmcat.com> wrote:

>
>
> >
> >test at devpc:~/libwebsockets/build/bin$ ./libwebsockets-test-client
> >127.0.0.1
> >--port=8888
>
> Turn up the logging with -d 1023 or so
>
> >libwebsockets test client
> >(C) Copyright 2010-2013 Andy Green <andy at warmcat.com> licensed under
> >LGPL2.1
> >[1457:9886] NOTICE: Initial logging level 7
> >[1457:9886] NOTICE: Library version: 1.3 67f9459
> >[1457:9887] NOTICE: IPV6 compiled in and enabled
> >[1457:9887] NOTICE: libev support not compiled in
> >[1457:9889] NOTICE:  static allocation: 4472 + (12 x 1024 fds) = 16760
> >bytes
> >[1457:9890] NOTICE:  canonical_hostname = pk-laptop
> >[1457:9890] NOTICE:  per-conn mem: 128 + 1594 headers + protocol rx buf
> >Waiting for connect...
> >[1457:9932] WARN: problems parsing header
> >Exiting
> >[1457:9933] NOTICE: libwebsocket_context_destroy
> >
> >And on the node server, I see the following log
> >
> >test at devpc:~/node$ DEBUG=* node basic.js
> >   info  - socket.io started
> >   debug - destroying non-socket.io upgrade
> >   debug - destroying non-socket.io upgrade
>
> Is socket.io compliant with the actual websockets standard or some older
> RFC?
>
> It seems it can't parse our upgrade request (which does pretty good at
> being compliant with everything else).
>
> -Andy
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20140805/f77d2754/attachment-0001.html>
-------------- next part --------------
test at devpc:~/libwebsockets/build/bin$ ./libwebsockets-test-client 127.0.0.1 --port=8888 -d 1023
libwebsockets test client
(C) Copyright 2010-2013 Andy Green <andy at warmcat.com> licensed under LGPL2.1
[411975:0383] NOTICE: Initial logging level 1023
[411975:0383] NOTICE: Library version: 1.3 67f9459
[411975:0383] NOTICE: IPV6 compiled in and enabled
[411975:0384] NOTICE: libev support not compiled in
[411975:0384] INFO:  LWS_MAX_HEADER_LEN: 1024
[411975:0384] INFO:  LWS_MAX_PROTOCOLS: 5
[411975:0384] INFO:  SPEC_LATEST_SUPPORTED: 13
[411975:0384] INFO:  AWAITING_TIMEOUT: 5
[411975:0384] INFO:  SYSTEM_RANDOM_FILEPATH: '/dev/urandom'
[411975:0384] INFO:  LWS_MAX_ZLIB_CONN_BUFFER: 65536
[411975:0385] NOTICE:  static allocation: 4472 + (12 x 1024 fds) = 16760 bytes
[411975:0385] INFO:  LWS_MAX_EXTENSIONS_ACTIVE: 3
[411975:0386] NOTICE:  canonical_hostname = pk-laptop
[411975:0386] NOTICE:  per-conn mem: 128 + 1594 headers + protocol rx buf
[411975:0415] PARSER:   Protocol: dumb-increment-protocol,fake-nonexistant-protocol
[411975:0415] PARSER:   Protocol: fake-nonexistant-protocol,lws-mirror-protocol
[411975:0416] CLIENT: libwebsocket_client_connect: direct conn
[411975:0416] CLIENT: libwebsocket_client_connect_2
[411975:0416] CLIENT: libwebsocket_client_connect_2: address 127.0.0.1
[411975:0416] INFO: insert_wsi_socket_into_fds: wsi=0x91f2618, sock=6, fds pos=1
[411975:0439] CLIENT: nonblocking connect retry
Waiting for connect...
[411975:0440] CLIENT: libwebsocket_client_connect_2
[411975:0440] CLIENT: libwebsocket_client_connect_2: address 127.0.0.1
[411975:0440] CLIENT: connected
[411975:0441] CLIENT: libwebsocket_client_connect: direct conn
[411975:0441] CLIENT: libwebsocket_client_connect_2
[411975:0441] CLIENT: libwebsocket_client_connect_2: address 127.0.0.1
[411975:0441] INFO: insert_wsi_socket_into_fds: wsi=0x91f2d88, sock=7, fds pos=2
[411975:0442] CLIENT: nonblocking connect retry
[411975:0442] CLIENT: libwebsocket_client_connect_2
[411975:0442] CLIENT: libwebsocket_client_connect_2: address 127.0.0.1
[411975:0442] CLIENT: connected
[411975:0473] PARSER: WSI_TOKEN_NAME_PART '|'
[411975:0473] INFO: Unknown method - dropping
[411975:0474] WARN: problems parsing header
[411975:0474] INFO: closing connection at LWS_CONNMODE...SERVER_REPLY
[411975:0474] DEBUG: close: just_kill_connection
[411975:0474] INFO: remove_wsi_socket_from_fds: wsi=0x91f2618, sock=6, fds pos=1
[411975:0474] DEBUG: not calling back closed
Exiting
[411975:0474] NOTICE: libwebsocket_context_destroy
[411975:0474] DEBUG: close: just_kill_connection
[411975:0474] INFO: remove_wsi_socket_from_fds: wsi=0x91f2d88, sock=7, fds pos=1
[411975:0474] DEBUG: not calling back closed
test at devpc:~/libwebsockets/build/bin$ 



More information about the Libwebsockets mailing list