diff options
Diffstat (limited to 'src/OSSupport/Socket.h')
-rw-r--r-- | src/OSSupport/Socket.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/OSSupport/Socket.h b/src/OSSupport/Socket.h index b86560de8..4ca3d61f4 100644 --- a/src/OSSupport/Socket.h +++ b/src/OSSupport/Socket.h @@ -14,7 +14,7 @@ #endif - +#include "Errors.h" class cSocket @@ -39,7 +39,11 @@ public: bool IsValid(void) const { return IsValidSocket(m_Socket); } void CloseSocket(void); - + + /** Notifies the socket that we don't expect any more reads nor writes on it. + Most TCPIP implementations use this to send the FIN flag in a packet */ + void ShutdownReadWrite(void); + operator xSocket(void) const; xSocket GetSocket(void) const; @@ -53,11 +57,10 @@ public: /// Initializes the network stack. Returns 0 on success, or another number as an error code. static int WSAStartup(void); - static AString GetErrorString(int a_ErrNo); static int GetLastError(); static AString GetLastErrorString(void) { - return GetErrorString(GetLastError()); + return GetOSErrorString(GetLastError()); } /// Creates a new socket of the specified address family @@ -111,4 +114,4 @@ public: private: xSocket m_Socket; AString m_IPString; -};
\ No newline at end of file +}; |