Example #1
0
 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
Example #2
0
 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
Example #3
0
 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