Send one dict command: literal CRLF, then the flush that puts it on the wire.
Send one dict command: literal CRLF, then the flush that puts it on the wire.
Answer
Writer out = new OutputStreamWriter( socket.getOutputStream(), StandardCharsets.UTF_8); out.write("DEFINE eng-lat gold\r\n"); out.flush();
The terminator is written literally because the protocol says CRLF, not "a newline". Without the `flush()` the four bytes sit in the writer's buffer and the server never sees a request.
Harold 4e ch8 §Writing to Servers with Sockets