Add streaming operator to socket

Mainly for diagnostic purposes
Merge remote-tracking branch 'upstream/master'
Merge pull request #42 from rodgert/master

Add streaming operator to socket