summaryrefslogtreecommitdiff
path: root/src/ActiveSocket.h
diff options
context:
space:
mode:
authorPetr Mrázek2012-03-11 16:00:38 +0100
committerPetr Mrázek2012-03-11 16:00:38 +0100
commit9f3026df545efeccb9bf33fe56f47bdee4c06e4a (patch)
treef01ed18171054d77ce41bd9fa827806561458025 /src/ActiveSocket.h
parentf8a2b0977253079b66d4ec14d5fceaa8458d11d6 (diff)
downloadclsocket-9f3026df545efeccb9bf33fe56f47bdee4c06e4a.tar.gz
clsocket-9f3026df545efeccb9bf33fe56f47bdee4c06e4a.tar.bz2
clsocket-9f3026df545efeccb9bf33fe56f47bdee4c06e4a.tar.xz
Unify whitespace and formatting
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;
};