Write echo client/server