Example #1
0
 def __init__(self, host='127.0.0.1', port=8444):
     if not hasattr(self, '_map'):
         AdvancedDispatcher.__init__(self)
     self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
     self.set_reuse_addr()
     self.bind((host, port))
     self.destination = state.Peer(host, port)
     self.listen(5)
Example #2
0
 def __init__(self, address=None, sock=None):
     # pylint: disable=unused-argument, super-init-not-called
     AdvancedDispatcher.__init__(self, sock)
     self.isOutbound = False
     # packet/connection from a local IP
     self.local = False
     self.pendingUpload = RandomTrackingDict()
     # canonical identifier of network group
     self.network_group = None
Example #3
0
 def __init__(self, host='127.0.0.1', port=8444):
     if not hasattr(self, '_map'):
         AdvancedDispatcher.__init__(self)
     self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
     self.set_reuse_addr()
     for attempt in range(50):
         try:
             if attempt > 0:
                 port = random.randint(32767, 65535)
             self.bind((host, port))
         except socket.error as e:
             if e.errno in (asyncore.EADDRINUSE, asyncore.WSAEADDRINUSE):
                 continue
         else:
             if attempt > 0:
                 BMConfigParser().set("bitmessagesettings", "port", str(port))
                 BMConfigParser().save()
             break
     self.destination = state.Peer(host, port)
     self.bound = True
     self.listen(5)
Example #4
0
 def __init__(self, host='127.0.0.1', port=8444):
     if not hasattr(self, '_map'):
         AdvancedDispatcher.__init__(self)
     self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
     self.set_reuse_addr()
     for attempt in range(50):
         try:
             if attempt > 0:
                 port = random.randint(32767, 65535)
             self.bind((host, port))
         except socket.error as e:
             if e.errno in (asyncore.EADDRINUSE, asyncore.WSAEADDRINUSE):
                 continue
         else:
             if attempt > 0:
                 BMConfigParser().set("bitmessagesettings", "port", str(port))
                 BMConfigParser().save()
             break
     self.destination = state.Peer(host, port)
     self.bound = True
     self.listen(5)
Example #5
0
 def __init__(self, address=None, sock=None):
     AdvancedDispatcher.__init__(self, sock)
     self.isOutbound = False
Example #6
0
 def __init__(self, address=None, sock=None):
     AdvancedDispatcher.__init__(self, sock)
     self.isOutbound = False
     # packet/connection from a local IP
     self.local = False
Example #7
0
 def __init__(self, address=None, sock=None):
     AdvancedDispatcher.__init__(self, sock)
     self.isOutbound = False
     # packet/connection from a local IP
     self.local = False
Example #8
0
 def __init__(self, address=None, sock=None):
     AdvancedDispatcher.__init__(self, sock)
     self.isOutbound = False
     # packet/connection from a local IP
     self.local = False
     self.pendingUpload = RandomTrackingDict()