adds client example

This commit is contained in:
Moisés Guimarães
2017-01-18 18:18:19 -02:00
parent 5c8e69eb5e
commit 51bf46288b
2 changed files with 141 additions and 3 deletions

View File

@@ -101,9 +101,8 @@ def get_method(index):
def main():
args = build_arg_parser().parse_args()
print(args)
bind_socket = socket.socket()
bind_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
bind_socket.bind(("" if args.b else "localhost", args.p))
bind_socket.listen(5)
@@ -141,7 +140,6 @@ def main():
finally:
if secure_socket:
secure_socket.shutdown(socket.SHUT_RDWR)
secure_socket.close()
if not args.i: