Package jodd.http

Class Sockets


  • public class Sockets
    extends java.lang.Object
    Sockets factory.
    • Constructor Summary

      Constructors 
      Constructor Description
      Sockets()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.net.Socket connect​(java.lang.String hostname, int port)
      Creates a socket.
      static java.net.Socket connect​(java.lang.String hostname, int port, int connectionTimeout)
      Creates a socket with a timeout.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Sockets

        public Sockets()
    • Method Detail

      • connect

        public static java.net.Socket connect​(java.lang.String hostname,
                                              int port)
                                       throws java.io.IOException
        Creates a socket.
        Throws:
        java.io.IOException
      • connect

        public static java.net.Socket connect​(java.lang.String hostname,
                                              int port,
                                              int connectionTimeout)
                                       throws java.io.IOException
        Creates a socket with a timeout.
        Throws:
        java.io.IOException