adding content from other sample code

adding sample socket io code from other project. Also adding example
code from three js