added automatic closing of sockets and channel. made use of websocket.Message instead of Conn#Write/Read.