summaryrefslogtreecommitdiff
path: root/src/ActiveSocket.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ActiveSocket.h')
-rw-r--r--src/ActiveSocket.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/ActiveSocket.h b/src/ActiveSocket.h
index c38fa5b..08f0982 100644
--- a/src/ActiveSocket.h
+++ b/src/ActiveSocket.h
@@ -48,40 +48,42 @@
class CPassiveSocket;
/// Provides a platform independent class to create an active socket.
-/// An active socket is used to create a socket which connects to a server.
+/// An active socket is used to create a socket which connects to a server.
/// This type of object would be used when an application needs to send/receive
-/// data from a server.
+/// data from a server.
class CActiveSocket : public CSimpleSocket {
public:
friend class CPassiveSocket;
CActiveSocket(CSocketType type = SocketTypeTcp);
- virtual ~CActiveSocket() { Close(); };
+ virtual ~CActiveSocket() {
+ Close();
+ };
- /// Established a connection to the address specified by pAddr.
- /// Connection-based protocol sockets (CSocket::SocketTypeTcp) may
- /// successfully call Open() only once, however; connectionless protocol
- /// sockets (CSocket::SocketTypeUdp) may use Open() multiple times to
- /// change their association.
+ /// Established a connection to the address specified by pAddr.
+ /// Connection-based protocol sockets (CSocket::SocketTypeTcp) may
+ /// successfully call Open() only once, however; connectionless protocol
+ /// sockets (CSocket::SocketTypeUdp) may use Open() multiple times to
+ /// change their association.
/// @param pAddr specifies the destination address to connect.
/// @param nPort specifies the destination port.
/// @return true if successful connection made, otherwise false.
virtual bool Open(const uint8 *pAddr, int16 nPort);
private:
- /// Utility function used to create a TCP connection, called from Open().
+ /// Utility function used to create a TCP connection, called from Open().
/// @return true if successful connection made, otherwise false.
bool ConnectTCP(const uint8 *pAddr, int16 nPort);
- /// Utility function used to create a UDP connection, called from Open().
+ /// Utility function used to create a UDP connection, called from Open().
/// @return true if successful connection made, otherwise false.
bool ConnectUDP(const uint8 *pAddr, int16 nPort);
- /// Utility function used to create a RAW connection, called from Open().
+ /// Utility function used to create a RAW connection, called from Open().
/// @return true if successful connection made, otherwise false.
bool ConnectRAW(const uint8 *pAddr, int16 nPort);
- private:
+private:
struct hostent *m_pHE;
};