From f2343ad81b9f8f38452f45e70963bca93a1c03e4 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 6 Feb 2012 11:53:01 +0000 Subject: cSocket: re-implemented the GetLastErrorString() function; win: error texts are now queried from the system rather than enumerated by the program git-svn-id: http://mc-server.googlecode.com/svn/trunk@235 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cSocket.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/cSocket.h') diff --git a/source/cSocket.h b/source/cSocket.h index 98fc5fdc4..81408c918 100644 --- a/source/cSocket.h +++ b/source/cSocket.h @@ -29,7 +29,12 @@ public: static int WSAStartup(); static AString GetErrorString( int a_ErrNo ); - static int GetLastError(); + static int GetLastError(); + static AString GetLastErrorString(void) + { + return GetErrorString(GetLastError()); + } + static cSocket CreateSocket(); inline static bool IsSocketError( int a_ReturnedValue ) -- cgit v1.2.3