mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
python: add default port for bootstrap
This commit is contained in:
1 parent
42171efc3f
commit
9fadcc907c
1 file changed
+5
-2
+5
-2
@@ -280,8 +280,11 @@ cdef class DhtRunner(_WithID):
|
||||
return h
|
||||
def getNodeId(self):
|
||||
return self.thisptr.get().getNodeId().toString()
|
||||
def bootstrap(self, str host, str port):
|
||||
self.thisptr.get().bootstrap(host.encode(), port.encode())
|
||||
def bootstrap(self, str host, str port=None):
|
||||
if port:
|
||||
self.thisptr.get().bootstrap(host.encode(), port.encode())
|
||||
else:
|
||||
self.thisptr.get().bootstrap(host.encode(), b'4222')
|
||||
def run(self, Identity id=None, is_bootstrap=False, cpp.in_port_t port=0, str ipv4="", str ipv6="", DhtConfig config=DhtConfig()):
|
||||
if id:
|
||||
config.setIdentity(id)
|
||||
|
||||
Reference in new issue
Block a user