コード例 #1
0
def web_socket_transfer_data(request):
    if hasattr(request, 'ws_location'):
        location = request.ws_location
    else:
        # When hybi protocol is used, pywebsocket does not provide
        # ws_location attribute because servers are not required to send
        # Sec-WebSocket-Location header according to the protocol
        # specification. If ws_location attribute is not available,
        # we use pywebsocket's internal function "build_function"
        # to obtain the identical value.
        location = build_location(request)
    msgutil.send_message(request, location)
コード例 #2
0
ファイル: echo-location_wsh.py プロジェクト: Ashod/webkit
def web_socket_transfer_data(request):
    if hasattr(request, 'ws_location'):
        location = request.ws_location
    else:
        # When hybi protocol is used, pywebsocket does not provide
        # ws_location attribute because servers are not required to send
        # Sec-WebSocket-Location header according to the protocol
        # specification. If ws_location attribute is not available,
        # we use pywebsocket's internal function "build_function"
        # to obtain the identical value.
        location = build_location(request)
    msgutil.send_message(request, location)
コード例 #3
0
 def _set_location(self):
     self._request.ws_location = build_location(self._request)
コード例 #4
0
ファイル: handshake.py プロジェクト: 469306621/Languages
 def _set_location(self):
     # |Host|
     host = self._request.headers_in.get('Host')
     if host is not None:
         self._request.ws_location = build_location(self._request)
コード例 #5
0
 def _set_location(self):
     # |Host|
     host = self._request.headers_in.get(common.HOST_HEADER)
     if host is not None:
         self._request.ws_location = build_location(self._request)
コード例 #6
0
ファイル: draft75.py プロジェクト: humphd/mozilla-central-old
 def _set_location(self):
     self._request.ws_location = build_location(self._request)
コード例 #7
0
ファイル: hybi00.py プロジェクト: Anachid/mozilla-central
 def _set_location(self):
     # |Host|
     host = self._request.headers_in.get(common.HOST_HEADER)
     if host is not None:
         self._request.ws_location = build_location(self._request)
コード例 #8
0
 def _set_location(self):
     # |Host|
     host = self._request.headers_in.get('Host')
     if host is not None:
         self._request.ws_location = build_location(self._request)