#include "localHostName.h"
Definition at line 28 of file localHostName.h.
localHostName::localHostName |
( |
| ) |
|
Definition at line 27 of file localHostName.cpp.
30 const char * pErrStr =
"<unknown host>";
32 if ( this->attachedToSockLib ) {
33 status = gethostname (
37 strncpy ( this->
cache, pErrStr,
sizeof ( this->
cache ) );
39 this->
cache [
sizeof ( this->
cache ) - 1u ] =
'\0';
40 this->length = strlen ( this->
cache );
localHostName::~localHostName |
( |
| ) |
|
unsigned localHostName::getName |
( |
char * |
pBuf, |
|
|
unsigned |
bufLength |
|
) |
| const |
Definition at line 50 of file localHostName.cpp.
54 strncpy ( pBuf, this->
cache, bufLength );
55 if ( this->length < bufLength ) {
59 unsigned reducedSize = bufLength - 1;
60 pBuf [ reducedSize ] =
'\0';
unsigned localHostName::nameLength |
( |
| ) |
const |
|
inline |
const char * localHostName::pointer |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following files: