Java Server Socket Create createServerSocket(int port)

Here you can find the source of createServerSocket(int port)

Description

create Server Socket

License

Open Source License

Declaration

public static ServerSocket createServerSocket(int port) throws IOException 

Method Source Code


//package com.java2s;

import java.net.*;
import java.io.*;

public class Main {
    public static final int RECV_BUF_SIZE = 1000000;

    public static ServerSocket createServerSocket(int port) throws IOException {
        ServerSocket server = new ServerSocket(port);
        server.setReceiveBufferSize(RECV_BUF_SIZE);
        return server;
    }//from w  w w.j a  va2s . co m
}

Related

  1. createServerSocket()
  2. createServerSocket(int port, int backlog, String host, SSLServerSocketFactory f)
  3. createServerSocket(int start_port)