def __init__(self):
        Greenlet.__init__(self)

        self._sock = socket(AF_INET, SOCK_DGRAM)
        self._sock.bind(get_cg_client_address())
        self._listener = self._dummy_listener
        self._line = ''
        self._running = False
Exemple #2
0
    def __init__(self):
        Greenlet.__init__(self)

        self._sock = socket(AF_INET, SOCK_DGRAM)
        self._sock.bind(get_cg_client_address())
        self._listener = self._dummy_listener
        self._line = ''
        self._running = False
Exemple #3
0
def _get_client_endpoints():
    """
    Gets a map from endpoints to corresponding (IP, port) pairs.
    Only CIPOP handled in this simple simulator.
    When a request is received having src=CIPOP, then the response is sent to
    the corresponding IP/port in this dict.
    """
    _client_endpoints = {CIPOP: get_cg_client_address()}
    print("_client_endpoints: %s" % str(_client_endpoints))
    return _client_endpoints
def _get_client_endpoints():
    """
    Gets a map from endpoints to corresponding (IP, port) pairs.
    Only CIPOP handled in this simple simulator.
    When a request is received having src=CIPOP, then the response is sent to
    the corresponding IP/port in this dict.
    """
    _client_endpoints = {CIPOP: get_cg_client_address()}
    print("_client_endpoints: %s" % str(_client_endpoints))
    return _client_endpoints