decaf::internal::net::DefaultSocketFactory Class Reference
SocketFactory implementation that is used to create Sockets.
More...
#include <src/main/decaf/internal/net/DefaultSocketFactory.h>
Public Member Functions |
| | DefaultSocketFactory () |
| virtual | ~DefaultSocketFactory () |
| virtual decaf::net::Socket * | createSocket () |
| | Creates an unconnected Socket object.- Returns:
- a new Socket object, caller must free this object when done.
- Exceptions:
-
| IOException | if the Socket cannot be created. |
|
| virtual decaf::net::Socket * | createSocket (const decaf::net::InetAddress *host, int port) |
| | Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.- Parameters:
-
| host | The host to connect the socket to. |
| port | The port on the remote host to connect to. |
- Returns:
- a new Socket object, caller must free this object when done.
- Exceptions:
-
|
| virtual decaf::net::Socket * | createSocket (const decaf::net::InetAddress *host, int port, const decaf::net::InetAddress *ifAddress, int localPort) |
| | Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.The Socket will be bound to the specified local address and port.- Parameters:
-
| host | The host to connect the socket to. |
| port | The port on the remote host to connect to. |
| ifAddress | The address on the local machine to bind the Socket to. |
| localPort | The local port to bind the Socket to. |
- Returns:
- a new Socket object, caller must free this object when done.
- Exceptions:
-
|
| virtual decaf::net::Socket * | createSocket (const std::string &name, int port) |
| | Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.- Parameters:
-
| host | The host name or IP address to connect the socket to. |
| port | The port on the remote host to connect to. |
- Returns:
- a new Socket object, caller must free this object when done.
- Exceptions:
-
|
| virtual decaf::net::Socket * | createSocket (const std::string &name, int port, const decaf::net::InetAddress *ifAddress, int localPort) |
| | Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.- Parameters:
-
| host | The host name or IP address to connect the socket to. |
| port | The port on the remote host to connect to. |
| ifAddress | The address on the local machine to bind the Socket to. |
| localPort | The local port to bind the Socket to. |
- Returns:
- a new Socket object, caller must free this object when done.
- Exceptions:
-
|
Detailed Description
SocketFactory implementation that is used to create Sockets.
- Since:
- 1.0
Constructor & Destructor Documentation
| decaf::internal::net::DefaultSocketFactory::DefaultSocketFactory |
( |
|
) |
|
| virtual decaf::internal::net::DefaultSocketFactory::~DefaultSocketFactory |
( |
|
) |
[virtual] |
Member Function Documentation
Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.
- Parameters:
-
| host | The host name or IP address to connect the socket to. |
| port | The port on the remote host to connect to. |
| ifAddress | The address on the local machine to bind the Socket to. |
| localPort | The local port to bind the Socket to. |
- Returns:
- a new Socket object, caller must free this object when done.
- Exceptions:
-
Implements decaf::net::SocketFactory.
| virtual decaf::net::Socket* decaf::internal::net::DefaultSocketFactory::createSocket |
( |
const std::string & |
name, |
|
|
int |
port | |
|
) |
| | [virtual] |
Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.
- Parameters:
-
| host | The host name or IP address to connect the socket to. |
| port | The port on the remote host to connect to. |
- Returns:
- a new Socket object, caller must free this object when done.
- Exceptions:
-
Implements decaf::net::SocketFactory.
Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.The Socket will be bound to the specified local address and port.
- Parameters:
-
| host | The host to connect the socket to. |
| port | The port on the remote host to connect to. |
| ifAddress | The address on the local machine to bind the Socket to. |
| localPort | The local port to bind the Socket to. |
- Returns:
- a new Socket object, caller must free this object when done.
- Exceptions:
-
Implements decaf::net::SocketFactory.
Creates a new Socket object and connects it to the specified remote host and port using the configuration of this SocketFactory.
- Parameters:
-
| host | The host to connect the socket to. |
| port | The port on the remote host to connect to. |
- Returns:
- a new Socket object, caller must free this object when done.
- Exceptions:
-
Implements decaf::net::SocketFactory.
| virtual decaf::net::Socket* decaf::internal::net::DefaultSocketFactory::createSocket |
( |
|
) |
[virtual] |
The documentation for this class was generated from the following file: