added documentation for socket
updated test for socket