我正在为移动电话(使用j2me)编写一个简单的应用程序,该应用程序使用数据报协议进行客户端-服务器交互。移动应用程序将一些文本发送到服务器,服务器将这些文本打印到标准输出。以下是发送数据报(使用手机)的代码:
String ip;
String port;
String msg;
//Loading ip, port and msg from the user input, I won't write it here, 'cause it
//does not matter
//Below is a simple code snippet for sending msg to