src/main/java/org/jboss/net/sockets/DefaultClientSocketFactory.java
public Socket createSocket(String host, int port) throws IOException
   {
      InetAddress addr = null;
      if( bindAddress != null )
         addr = bindAddress;
      else
         addr = InetAddress.getByName(host);
      Socket s = new Socket(addr, port);
      return s;
   }
public Socket createSocket(String host, int port) throws IOException
   {
      InetAddress addr = null;
      if( bindAddress != null )
         addr = bindAddress;
      else
         addr = InetAddress.getByName(host);
      Socket s = new Socket(addr, port);
      return s;
   }
public Socket createSocket ( String host , int port ) throws IOException { InetAddress addr = null ; if ( bindAddress != null ) addr = bindAddress ; else addr = InetAddress . getByName ( host ) ; Socket s = new Socket ( addr , port ) ; return s ; }
Create a server socket on the specified port (port 0 indicates
an anonymous port).
@param  port the port number
@return the server socket on the specified port
@exception java.io.IOException if an I/O error occurs during server socket
creation
@since 1.2
Create a server socket on the specified port ( port 0 indicates an anonymous port ) .