Update socket.js

(**UNTESTED**) See lines 51-53, 58.
*Fixed problem with getting socket name when name is longer than 12 bytes.