Each nettobac instance (either nettobacClient or nettobacServer) contains a member variable called Errr, inherrited from n2bFactory. This variable is the error indicator and an error message at the same time:
An error check and the output of a human readable error message gets generated by (assuming the code is enclosed by a WITH Instance
block)
See macro ERR_MSG and its usage for an advanced example.
Furthermore, when the issue comes from a libc function call, you can gain detailed information from its errno.
The following sections list all manner of .Errr
strings reported by nettobac.
"client resolve IP"
: message from the constructor nettobacClient::nettobacClient(). It failed to resolve the IP adress of the server –> Check libc errno
. Check your network connection and configuration, especialy the name server settings."client connect"
: message from the constructor nettobacClient::nettobacClient(). It failed to connect to the servers IP adress –> Check libc errno
. Check your network connection."client socket check"
: message from function nettobacClient::nOpen(). It failed to use the socket created in the constructor –> Check the error message from the constructor."server bind"
: message from the constructor nettobacServer::nettobacServer(). It failed to assign a local socket address to the socket –> Check libc errno
. Check your network connection."server listen"
: message from the constructor nettobacServer::nettobacServer(). It failed to listen for socket connections at the port –> Check libc errno
. Check your network connection."server select"
: message from function nettobacServer::nOpen(). It failed to select the socket for read access. –> Check libc errno
. Check your network connection."server isset"
: message from function nettobacServer::nOpen(). It failed to find pending data at the port. –> Usually this means there is no pending client connection request. You can ignore that message. Otherwise check libc errno
."server accept"
: message from function nettobacServer::nOpen(). It failed to accept the new client connection on the socket –> Check libc errno
. Check your network connection."opensocket"
: message from the constructor n2bFactory::n2bFactory(). It failed to open a new socket for this instance –> Check libc errno
. Check your network connection."find connection"
: message from function n2bFactory::nClose(). It failed to find the connection in the list of open connections. –> Check the pointer value. Check if the connection gets closed at an other place in your code, before."setsockopt"
: message from the constructor n2bConnection::n2bConnection(). It failed to set options for the socket –> Anything went totaly wrong. Check libc errno. Good luck to find the bug."put socket check"
: message from function n2bConnection::nPut(). It failed checking the socket identifier. –> Anything went totaly wrong. Check libc errno. Good luck to find the bug."get socket check"
: message from function n2bConnection::nGet(). It failed checking the socket identifier. –> Anything went totaly wrong. Check libc errno. Good luck to find the bug."put data check"
: message from function n2bConnection::nPut(). It failed checking the data to send. Either the pointer to the data Dat
is zero or the length Az
is zero. –> Pass correct parameters to the function."select"
: message from function n2bConnection::nGet() or n2bConnection::nPut(). It failed to select the socket. –> Check libc errno
. Check your network connection."retry"
: message from function n2bConnection::nGet() or n2bConnection::nPut(). It failed to receive or send data, since the maximum number of re-tries is reached –> Check your network connection. Increase the parameter ReTry
for bad connections."send data"
: message from function n2bConnection::nPut(). It failed to send data over the socket –> Check libc errno
. Check your network connection."receive data"
: message from function n2bConnection::nGet(). It failed to receive data from the socket –> Check libc errno
. Check your network connection."disconnected"
: message from function n2bConnection::nGet(). It failed to get data from the socket –> Your peer closed that connection. You cannot use it any more, close it as well.