Attaching of a socket to existing channel

It's possible first create a channel and write to it and then attach socket.
Merge pull request #37 from andrusha97/master

Attaching of a socket to existing channel