Add PyPI package (WIP)

This commit is contained in:
Joseph Henry
2021-03-03 23:02:50 -08:00
parent 9bca3270bc
commit 7bc690046a
8 changed files with 175 additions and 3 deletions

View File

@@ -1,7 +1,6 @@
import time, sys
import libzt
from prototype import *
# Where identity files are stored
keyPath = "."
@@ -114,7 +113,7 @@ print('Joined network')
if (mode == 'server'):
print("Starting server...")
try:
serv = zerotier.socket(libzt.ZTS_AF_INET6, libzt.ZTS_SOCK_STREAM, 0)
serv = libzt.zerotier.socket(libzt.ZTS_AF_INET, libzt.ZTS_SOCK_STREAM, 0)
serv.bind(('::', serverPort))
serv.listen(5)
while True:
@@ -144,7 +143,7 @@ if (mode == 'server'):
if (mode == 'client'):
print("Starting client...")
try:
client = zerotier.socket(libzt.ZTS_AF_INET6, libzt.ZTS_SOCK_STREAM, 0)
client = libzt.zerotier.socket(libzt.ZTS_AF_INET, libzt.ZTS_SOCK_STREAM, 0)
print("connecting...")
client.connect((remoteIP, serverPort))
print("send...")