package com.jqmobile.core.utils.socket; import com.jqmobile.core.utils.socket.base.BaseSocketClient; public class RequestTest { private final static int serverPort = 9799; private final static String serverUrl = "127.0.0.1"; public static void main(String[] args) { SocketTest param; ISocketClient<SocketTest> client = new BaseSocketClient<SocketTest>(serverUrl, serverPort); for(int i=0; i<10000; i++){ param = new SocketTest(); param.name="test====="+i; try { client.submit(param); } catch (Exception e1) { e1.printStackTrace(); } // try { // lock.wait(100); // } catch (InterruptedException e1) { // e1.printStackTrace(); // continue; // } } } }