Hi,
When applying the above code, I get the following message after using the writeSocket:
writeSocket[udpSocket, "127.0.0.1", 5000, ToCharacterCode["hello from mathematica"]]
JavaNew::argx: Incorrect number or type of arguments to constructor for class java.net.DatagramPacket. The arguments, shown here in a list, were {{104,101,108,108,111,32,102,114,111,109,32,109,97,116,104,101,109,97,116,105,99,97},22,InetAddress`getByName[127.0.0.1],5000}.
Java::argx1: Method named send defined in class java.net.DatagramSocket was called with an incorrect number or type of arguments. The argument was $Failed.
$Failed
any idea why?