Example #1
0
def server():
    server = Server(9090)
    server_thread = threading.Thread(target=server.start)
    server_thread.start()
    yield
    server.stop()
    server_thread.join()
Example #2
0
def main():
    server = Server(9090)
    server_thread = threading.Thread(target=server.start)
    server_thread.start()

    client = Client(9090)
    client.put('foo', 'bar')
    client.get('foo')
    client.get('baz')
    server.stop()
    server_thread.join()
Example #3
0
def main():
    server = Server(9090)
    server_thread = threading.Thread(target=server.start)
    server_thread.start()

    client = Client(9090)
    client.put('foo', 'bar')
    client.get('foo')
    client.get('baz')
    server.stop()
    server_thread.join()