Java Socket.setSendBufferSize(int size)
Syntax
Socket.setSendBufferSize(int size) has the following syntax.
public void setSendBufferSize(int size) throws SocketException
Example
In the following code shows how to use Socket.setSendBufferSize(int size) method.
import java.net.Socket;
/*from www. j a v a 2 s . c o m*/
public class Main {
public static void main(String[] args) throws Exception {
Socket client = new Socket("google.com", 80);
client.setSendBufferSize(1000);
System.out.println(client.getSendBufferSize());
client.close();
}
}