def _create_socket(self, addr): sock = ScionServerSocket(L4Proto.UDP, bytes(self.sd.api_addr, 'ascii')) sock.settimeout(5.0) if sock.bind(0, self.addr) < 0: return None return sock
def _create_socket(self, addr): sock = ScionServerSocket(L4Proto.SSP, bytes(self.api_addr, 'ascii')) sock.settimeout(5.0) sock.bind(0, self.addr) sock.listen() return sock
def _create_socket(self, addr): sock = ScionServerSocket(L4Proto.SSP, bytes(self.sd.api_addr, 'ascii')) sock.settimeout(5.0) sock.bind(random.randint(1025, 65535), self.addr) sock.listen() return sock