1 #ifndef SOCKETEXCEPTION_H_
2 #define SOCKETEXCEPTION_H_
12 int length = strlen( message );
13 if( length > 8191 ) length = 8191;
15 strncpy(
message_, message, length );
22 size_t length1 = strlen( message1 );
23 if( length1 > 4095 ) length1 = 4095;
24 size_t length2 = strlen( message2 );
25 if( length2 > 4095 ) length2 = 4095;
26 message_ =
new char[length1 + length2 + 1];
27 strncpy(
message_, message1, length1 );
28 strncpy(
message_ + length1, message2, length2 );
37 const char*
what()
const throw()
49 int length = strlen( old.
message_ ) + 1;
Definition: SocketException.h:6
~SocketException()
Definition: SocketException.h:32
SocketException(const SocketException &old)
Definition: SocketException.h:47
const char * what() const
Definition: SocketException.h:37
int errno_
Definition: SocketException.h:57
int getErrno()
Definition: SocketException.h:42
SocketException(const char *message1, const char *message2, int errcode=0)
Definition: SocketException.h:19
char * message_
Definition: SocketException.h:56
SocketException(const char *message, int errcode=0)
Definition: SocketException.h:9