NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

gov.nist.core.net
Interface NetworkLayer

All Known Implementing Classes:
DefaultNetworkLayer, SslNetworkLayer

public interface NetworkLayer

basic interface to the network layer

Author:
m.andrews

Method Summary
 DatagramSocket createDatagramSocket()
          Constructs a datagram socket and binds it to any available port on the local host machine.
 DatagramSocket createDatagramSocket(int port, InetAddress laddr)
          Creates a datagram socket, bound to the specified local address.
 ServerSocket createServerSocket(int port, int backlog, InetAddress bindAddress)
          Creates a server with the specified port, listen backlog, and local IP address to bind to.
 Socket createSocket(InetAddress address, int port)
          Creates a stream socket and connects it to the specified port number at the specified IP address.
 Socket createSocket(InetAddress address, int port, InetAddress localAddress)
          Creates a stream socket and connects it to the specified port number at the specified IP address.
 Socket createSocket(InetAddress address, int port, InetAddress myAddress, int myPort)
          Creates a new Socket, binds it to myAddress:myPort and connects it to address:port.
 SSLServerSocket createSSLServerSocket(int port, int backlog, InetAddress bindAddress)
          Creates an SSL server with the specified port, listen backlog, and local IP address to bind to.
 SSLSocket createSSLSocket(InetAddress address, int port)
          Creates a stream SSL socket and connects it to the specified port number at the specified IP address.
 SSLSocket createSSLSocket(InetAddress address, int port, InetAddress localAddress)
          Creates a stream SSL socket and connects it to the specified port number at the specified IP address.
 

Method Detail

createServerSocket

ServerSocket createServerSocket(int port,
                                int backlog,
                                InetAddress bindAddress)
                                throws IOException
Creates a server with the specified port, listen backlog, and local IP address to bind to. comparable to "new java.net.ServerSocket(port,backlog,bindAddress);"

Parameters:
port -
backlog -
bindAddress -
Returns:
the server socket
Throws:
IOException

createSSLServerSocket

SSLServerSocket createSSLServerSocket(int port,
                                      int backlog,
                                      InetAddress bindAddress)
                                      throws IOException
Creates an SSL server with the specified port, listen backlog, and local IP address to bind to. Added by Daniel J. Martinez Manzano

Parameters:
port -
backlog -
bindAddress -
Returns:
the server socket
Throws:
IOException

createSocket

Socket createSocket(InetAddress address,
                    int port)
                    throws IOException
Creates a stream socket and connects it to the specified port number at the specified IP address. comparable to "new java.net.Socket(address, port);"

Parameters:
address -
port -
Returns:
the socket
Throws:
IOException

createSocket

Socket createSocket(InetAddress address,
                    int port,
                    InetAddress localAddress)
                    throws IOException
Creates a stream socket and connects it to the specified port number at the specified IP address. comparable to "new java.net.Socket(address, port,localaddress);"

Parameters:
address -
port -
localAddress -
Returns:
the socket
Throws:
IOException

createSocket

Socket createSocket(InetAddress address,
                    int port,
                    InetAddress myAddress,
                    int myPort)
                    throws IOException
Creates a new Socket, binds it to myAddress:myPort and connects it to address:port.

Parameters:
address - the InetAddress that we'd like to connect to.
port - the port that we'd like to connect to
myAddress - the address that we are supposed to bind on or null for the "any" address.
myPort - the port that we are supposed to bind on or 0 for a random one.
Returns:
a new Socket, bound on myAddress:myPort and connected to address:port.
Throws:
IOException - if binding or connecting the socket fail for a reason (exception relayed from the correspoonding Socket methods)

createSSLSocket

SSLSocket createSSLSocket(InetAddress address,
                          int port)
                          throws IOException
Creates a stream SSL socket and connects it to the specified port number at the specified IP address. Added by Daniel J. Martinez Manzano

Parameters:
address -
port -
Returns:
the socket
Throws:
IOException

createSSLSocket

SSLSocket createSSLSocket(InetAddress address,
                          int port,
                          InetAddress localAddress)
                          throws IOException
Creates a stream SSL socket and connects it to the specified port number at the specified IP address. Added by Daniel J. Martinez Manzano

Parameters:
address -
port -
localAddress - -- my address.
Returns:
the socket
Throws:
IOException

createDatagramSocket

DatagramSocket createDatagramSocket()
                                    throws SocketException
Constructs a datagram socket and binds it to any available port on the local host machine. comparable to "new java.net.DatagramSocket();"

Returns:
the datagram socket
Throws:
SocketException

createDatagramSocket

DatagramSocket createDatagramSocket(int port,
                                    InetAddress laddr)
                                    throws SocketException
Creates a datagram socket, bound to the specified local address. comparable to "new java.net.DatagramSocket(port,laddr);"

Parameters:
port -
laddr -
Returns:
the datagram socket
Throws:
SocketException

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.