def serve(): server_sock = TServerSocket(host="127.0.0.1", port=9090) server_sock.listen() client = server_sock.accept() t = TCyBufferedTransport(client) proto.write_val(t, TType.STRING, val) t.flush()
def serve(): server_sock = TServerSocket(unix_socket="./thriftpy_test.sock") server_sock.listen() client = server_sock.accept() t = TCyBufferedTransport(client) proto.write_val(t, TType.STRING, val) t.flush()
def serve(): server_sock = TServerSocket( unix_socket="./thriftpy_test.sock") server_sock.listen() client = server_sock.accept() t = TCyBufferedTransport(client) proto.write_val(t, TType.STRING, val) t.flush()
def serve(): server_sock = TServerSocket(unix_socket=unix_sock) server_sock.listen() client = server_sock.accept() t = TCyBufferedTransport(client) proto.write_val(t, TType.STRING, val) t.flush() # wait for client to read time.sleep(1)