Socket.Socket() | Java

 

Descripción

Sintaxis

public Socket()
public Socket(String host, int port) throws UnknownHostException, IOException
@Deprecated public Socket(String host, int port, boolean stream) throws IOException
public Socket(String host, int port, InetAddress localAddr, int localPort) throws IOException
public Socket(InetAddress address, int port) throws IOException
@Deprecated public Socket(InetAddress host, int port, boolean stream) throws IOException
public Socket(InetAddress address, int port, InetAddress localAddr, int localPort) throws IOException
public Socket(Proxy proxy)
protected Socket(SocketImpl impl) throws SocketException

Parámetros

  • SocketImpl impl,
  • int localPort,
  • InetAddress address,
  • String host,
  • boolean stream,
  • InetAddress host,
  • int port,
  • Proxy proxy,
  • InetAddress localAddr,

Excepciones

IllegalArgumentException, IOException, SecurityException, UnknownHostException, SocketException, NullPointerException

Clase Padre

Socket

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.