Example usage for java.net ServerSocket ServerSocket

List of usage examples for java.net ServerSocket ServerSocket

Introduction

In this page you can find the example usage for java.net ServerSocket ServerSocket.

Prototype

public ServerSocket(int port) throws IOException 

Source Link

Document

Creates a server socket, bound to the specified port.

Usage

From source file:Main.java

public Main() throws IOException {
    serverSocket = new ServerSocket(8008);
    serverSocket.setSoTimeout(10000);

    //serverSocket.close();
}

From source file:Main.java

public Main() throws IOException {
    serverSocket = new ServerSocket(8008);
    serverSocket.setSoTimeout(10000);

    System.out.println(serverSocket.isBound());
}

From source file:Main.java

public Main() throws IOException {
    serverSocket = new ServerSocket(8008);
    serverSocket.setSoTimeout(10000);//  w w w.ja  v  a  2s . c  o  m

    System.out.println(serverSocket.getSoTimeout());
}

From source file:Main.java

public Main() throws IOException {
    serverSocket = new ServerSocket(8008);
    serverSocket.setSoTimeout(10000);/*from   w  w  w .  j  a  va2 s.co m*/

    serverSocket.setReuseAddress(true);
    System.out.println(serverSocket.getReuseAddress());
}

From source file:Main.java

public Main() throws IOException {
    serverSocket = new ServerSocket(8008);
    serverSocket.setSoTimeout(10000);

    System.out.println(serverSocket.toString());

}

From source file:Main.java

public Main() throws IOException {
    serverSocket = new ServerSocket(8008);
    serverSocket.setSoTimeout(10000);

    serverSocket.setReuseAddress(true);

}

From source file:Main.java

public Main() throws IOException {
    serverSocket = new ServerSocket(8008);
    serverSocket.setSoTimeout(10000);// w w w  .j  a  va 2s  .  c  om

    serverSocket.setReceiveBufferSize(12);
    System.out.println(serverSocket.getReceiveBufferSize());

}

From source file:MainClass.java

public MainClass() throws IOException {
    serverSocket = new ServerSocket(8008);
    serverSocket.setSoTimeout(10000);
}

From source file:Main.java

public Main() throws IOException {
    serverSocket = new ServerSocket(8008);
    serverSocket.setSoTimeout(10000);/*from   w  w w . j  av a  2  s  . co  m*/

    SocketAddress socketAddress = serverSocket.getLocalSocketAddress();

}

From source file:TimeServer.java

public TimeServer() throws Exception {
    sock = new ServerSocket(55555);
}