added another ctor to WebSocket