Thanks for the help, but that is not the issue.
There is a UDP server running and listening on port 6000. That is why the java client works. The Nim client works as well but just for the first message. After that the server console tells me that the client has disconnected. The connection is closed after the send command.