Client-side: get transport method which is in using

724 views
Skip to first unread message

hashi101

unread,
Nov 12, 2012, 7:27:05 AM11/12/12
to sock...@googlegroups.com
How to get transport name (client-side)?
I want to log this information to my database by ajax, when disconnect event happen.

Chad Engler

unread,
Nov 12, 2012, 9:11:18 AM11/12/12
to sock...@googlegroups.com

The internal socket object has that information:

 

var socket = io.connect();

 

console.log(socket.socket.transport.name); //log the name of the transport being used.

 

Just log the “socket” object to see all the wonderful things you can get.

 

-Chad

Kamil Krzyszczuk

unread,
Nov 12, 2012, 10:47:29 AM11/12/12
to sock...@googlegroups.com
yeah, it works, thanks :)



2012/11/12 Chad Engler <Chad....@patlive.com>
Reply all
Reply to author
Forward
0 new messages