':param socket: The eventlet socket
:type socket: :class:`eventlet.greenio.GreenSocket`
:param environ: The wsgi environment
:param version: The WebSocket spec version to follow (default is 76)'

def __init__(self, sock, environ, version=76):

    self.socket = sock
    self.origin = environ.get('HTTP_ORIGIN')
    self.protocol = environ.get('HTTP_WEBSOCKET_PROTOCOL')
    self.path = environ.get('PATH_INFO')
    self.environ = environ
    self.version = version
    self.websocket_closed = False
    self._buf = ''
    self._msgs = collections.deque()
