This is very odd. Here is the abridged output of my log:
info - socket.io started
debug - served static content /socket.io.js
debug - client authorized
info - handshake authorized D7J-52pdfYAtijFhFxh7
debug - setting request GET /socket.io/1/websocket/D7J-52pdfYAtijFhFxh7
debug - set heartbeat interval for client D7J-52pdfYAtijFhFxh7
debug - client authorized for
debug - websocket writing 1::
establishing db connection.
Attaching new socket D7J-52pdfYAtijFhFxh7 to namespace /59a0747b-50b3-46c9-be7e-3d74fd513fcf for actID: 1.
debug - served static content /socket.io.js
debug - client authorized
info - handshake authorized 6eUwG7fH-CG3vx3CFxh8
debug - setting request GET /socket.io/1/websocket/6eUwG7fH-CG3vx3CFxh8
debug - set heartbeat interval for client 6eUwG7fH-CG3vx3CFxh8
debug - client authorized for
debug - websocket writing 1::
establishing db connection.
debug - client authorized for /59a0747b-50b3-46c9-be7e-3d74fd513fcf
debug - websocket writing 1::/59a0747b-50b3-46c9-be7e-3d74fd513fcf
Attaching new socket 6eUwG7fH-CG3vx3CFxh8 to namespace /59a0747b-50b3-46c9-be7e-3d74fd513fcf for actID: 1.
The first block is on initial client connect, which is passing a namespace to socket.io like this: http://server/59a0747b-50b3-46c9-be7e-3d74fd513fcf
Please notice that these two lines are blank:
debug - client authorized for
debug - websocket writing 1::
The second block (all within the same log) occurs after I hit refresh on the client's web page. Same connecting URL, but you'll notice
debug - client authorized for /59a0747b-50b3-46c9-be7e-3d74fd513fcf
debug - websocket writing 1::/59a0747b-50b3-46c9-be7e-3d74fd513fcf
are displaying the necessary information in order for node to send data to the namespace'd client.
EDIT:
I don't understand why I have to refresh the client page in order for the connection to be successfully established, especially when if I investigate the
At no point after the initial client connection is the namespace found anywhere in the io object. Why?io.namespaces['/59a0747b-50b3-46c9-be7e-3d74fd513fcf'].sockets
object, the client's socket is listed.
It may or may not be worth mentioning the db lookup is the very first thing that occurs on client connect and i'm using node-mysql, but it connecting to a different, remote, server to pull that information.