Fork from code.google.com/p/go.net/websocket