I found the socket client inside of SLSB 3.0 takes more time to connect to a server which is implented by c++. but the same code works very fast on Tomcat .actually the code is very simple:
Socket socket = new Socket(host, port);
OutputStream outputStream = socket.getOutputStream();
InputStream inputStream = socket.getInputStream();
int messageBufferSize = 250;
byte res = new byte[messageBufferSize];
int len = inputStream.read(res);
Retrieving data ...