예제 #1
0
파일: app.py 프로젝트: kkndyu/shinysdr
 def get_url(self):
     """Get the absolute URL of the service. Cannot be used before startService is called.
     
     This method exists primarily for testing purposes."""
     port_num = self.__http_port_obj.socket.getsockname()[1]  # TODO touching implementation, report need for a better way (web_port_obj.port is 0 if specified port is 0, not actual port)
 
     # TODO: need to know canonical domain name (strport_to_url defaults to localhost); can we extract the information from the certificate when applicable?
     return strport_to_url(self.__http_port, socket_port=port_num, path=self.get_host_relative_url())
예제 #2
0
 def get_url(self):
     """Get the absolute URL of the service. Cannot be used before startService is called.
     
     This method exists primarily for testing purposes."""
     port_num = self.__http_port_obj.socket.getsockname()[1]  # TODO touching implementation, report need for a better way (web_port_obj.port is 0 if specified port is 0, not actual port)
 
     # TODO: need to know canonical domain name (strport_to_url defaults to localhost); can we extract the information from the certificate when applicable?
     return strport_to_url(self.__http_port, socket_port=port_num, path=self.get_host_relative_url())
예제 #3
0
파일: app.py 프로젝트: kkndyu/shinysdr
 def make_websocket_url(self, request, path):
     return strport_to_url(self.__ws_endpoint,
         hostname=request.getRequestHostname(),
         scheme='ws',
         path=path)
예제 #4
0
 def make_websocket_url(self, request, path):
     return strport_to_url(self.__ws_endpoint,
         hostname=request.getRequestHostname(),
         scheme='ws',
         path=path)