SocketFactory.createSocket() | Java

 

Descripción

Sintaxis

public Socket createSocket() throws IOException
public abstract Socket createSocket(String host, int port) throws IOException, UnknownHostException
public abstract Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException
public abstract Socket createSocket(InetAddress host, int port) throws IOException
public abstract Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException

Parámetros

  • InetAddress localHost,
  • int localPort,
  • InetAddress address,
  • InetAddress localAddress,
  • String host,
  • InetAddress host,
  • int port,

Excepciones

IllegalArgumentException, NullPointerException, IOException, SecurityException, UnknownHostException

Clase Padre

SocketFactory

Ejemplo


Líneas de Código

    Manual Java

    Aprende más sobre Java consultando online o descargando nuestro manual.

    Test Java

    ¿Te atreves a probar tus habilidades y conocimiento en Java con nuestro test?

    Vídeos Java

    Disfruta también de nuestros artículos sobre Java en formato vídeo. Aprovecha y suscribete a nuestro canal.