TutErrNumGetSocket


Name

TutErrNumGetSocket — get the value of the socket error number

Synopsis

T_INT4 TutErrNumGetSocket() 

Arguments

None

Return Values

The value of the socket error number.

Diagnostics

None

Description

The socket error number is a value indicating how the last socket function failed. The error number is valid only when TutErrNumGet reports T_ERR_SOCKET.

This error number is stored in a value for each thread to accommodate multi-threaded programs.

Caution

TutErrNumGetSocket should only be called when TutErrNumGet returns T_ERR_SOCKET.

See Also

TutErrNumGet, TutErrNumGetC, TutErrNumGetOs

Examples

This example checks if a socket error occurred and prints the related socket error code:

if (TutErrNumGet() == T_ERR_SOCKET) { 
  TutOut("Socket error %d occurred.\n", TutErrNumGetSocket()); 
} 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com