Does Java's TCP Socket class block when sending data
问题 When I use Javaa's Socket class to send out a byte array, does the write call in the following code block until it has verified that the recipient has received the data? byte data[] = ...; Socket socket = ...; socket.getOutputStream().write(data); // blocking ? The reason I ask, is if I have a list of sockets that I want to send the same data to, I want to send it as efficiently as possible, i.e., is there a better way than this: ArrayList<Socket> sockets = ...; byte data[] = ...; for(int i =