public interface SocketInterface
The actual work of the socket is performed by an instance of the SocketImpl class. An application, by changing the socket factory that creates the socket implementation, can configure itself to create sockets appropriate to the local firewall.
This socket interface allows usage of an SSL Socket on the client side that is dynamically defined in the applet parameters.
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this socket.
|
void |
createSocket()
Creates a stream socket and connects it to the specified port number
on the named host.
|
InetAddress |
getInetAddress()
Returns the address to which the socket is connected.
|
InputStream |
getInputStream()
Returns an input stream for this socket.
|
InetAddress |
getLocalAddress()
Gets the local address to which the socket is bound.
|
Socket |
getMainSocket()
Gets the main socket used for the interface (for SSL, this is
the SSL socket, for others, it's the normal socket).
|
OutputStream |
getOutputStream()
Returns an output stream for this socket.
|
Socket |
getPlainSocket()
Gets the plain socket used for the interface (for SSL, this is
the non-SSL socket, i.e.
|
void |
setTimeout(int value)
Sets the send timeout SO_TIMEOUT value.
|
void createSocket() throws UnknownHostException, IOException
IOException
- if an I/O error occurs when creating the socket.UnknownHostException
Socket getPlainSocket()
Socket getMainSocket()
InetAddress getInetAddress()
InetAddress getLocalAddress()
InputStream getInputStream() throws IOException
IOException
- if an I/O error occurs when creating the input stream.OutputStream getOutputStream() throws IOException
IOException
- if an I/O error occurs when creating the input stream.void close() throws IOException
IOException
- if an I/O error occurs when closing this socket.void setTimeout(int value)
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.