public interface NetworkLayer
Modifier and Type | Method and Description |
---|---|
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.
|
void |
setSipStack(SipStackImpl sipStackImpl)
Set the sip stack impl so that the network layer can access it to query properties
|
ServerSocket createServerSocket(int port, int backlog, InetAddress bindAddress) throws IOException
port
- backlog
- bindAddress
- IOException
SSLServerSocket createSSLServerSocket(int port, int backlog, InetAddress bindAddress) throws IOException
port
- backlog
- bindAddress
- IOException
Socket createSocket(InetAddress address, int port) throws IOException
address
- port
- IOException
Socket createSocket(InetAddress address, int port, InetAddress localAddress) throws IOException
address
- port
- localAddress
- IOException
Socket createSocket(InetAddress address, int port, InetAddress myAddress, int myPort) throws IOException
address
- the InetAddress that we'd like to connect to.port
- the port that we'd like to connect tomyAddress
- 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.IOException
- if binding or connecting the socket fail for a reason
(exception relayed from the correspoonding Socket methods)SSLSocket createSSLSocket(InetAddress address, int port) throws IOException
address
- port
- IOException
SSLSocket createSSLSocket(InetAddress address, int port, InetAddress localAddress) throws IOException
address
- port
- localAddress
- -- my address.IOException
DatagramSocket createDatagramSocket() throws SocketException
SocketException
DatagramSocket createDatagramSocket(int port, InetAddress laddr) throws SocketException
port
- laddr
- SocketException
void setSipStack(SipStackImpl sipStackImpl)
sipStackImpl
- Copyright © 2016. All Rights Reserved.