diff options
| author | Joseph Henry <[email protected]> | 2018-02-08 11:10:48 -0800 |
|---|---|---|
| committer | Joseph Henry <[email protected]> | 2018-02-08 11:10:48 -0800 |
| commit | c00f2a97e6f9ffa24ad42e694992edd26227304f (patch) | |
| tree | 6d371e44643a4e19c323d0ec77e7b8d44c80d857 | |
| parent | 16f06f97c6dd9611a685b39968376a4d1f25d41f (diff) | |
Cleanup to test.py1.1.6
| -rw-r--r-- | packages/pypi/test.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/packages/pypi/test.py b/packages/pypi/test.py index 34a2188..53e8c71 100644 --- a/packages/pypi/test.py +++ b/packages/pypi/test.py @@ -1,10 +1,23 @@ import libzt import time -print('joining virtual network...') -libzt.zts_startjoin('whatev_config', 0x1234567890ABCDEF) -print('fd = ' + str(libzt.zts_socket(1,2,3))) +nwid = 0x1234567890ABCDEF -print('looping forever, ping me') +# Authorization required via my.zerotier.com if this is a private network). +print('Joining virtual network...') +libzt.zts_startjoin('whatev_config', nwid) + +fd = libzt.zts_socket(AF_INET,SOCK_STREAM,0) +if fd < 0: + print('error creating socket') +print('fd = ' + str(fd)) + +# Display info about this node +print('I am ' + str(hex(libzt.zts_get_node_id()))) +address = None +libzt.zts_get_address(nwid, address, AF_INET) +print('assigned address = ' + str(address)) + +print('Looping forever, ping me or something') while True: time.sleep(1)
\ No newline at end of file |
