Java Socket Create createSocket(String host, int port)

Here you can find the source of createSocket(String host, int port)

Description

create Socket

License

Apache License

Declaration

public static Socket createSocket(String host, int port) throws UnknownHostException, IOException 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.io.IOException;

import java.net.Socket;
import java.net.UnknownHostException;

public class Main {
    public static Socket createSocket(String host, int port) throws UnknownHostException, IOException {
        return new Socket(host, port);
    }// w  w  w . j  a  va 2  s . co m
}

Related

  1. createSocket(String[] hostPort)
  2. createSocketAddr(String addr)
  3. createSocketAddr(String target)
  4. createSocketAddr(String target)