TutSocketSetBlockMode


Name

TutSocketSetBlockMode — set the block mode of a socket

Synopsis

T_BOOL TutSocketSetBlockMode(socket_fd, block_mode) 
T_INT4 socket_fd; 
T_BOOL block_mode; 

Arguments

socket_fd — socket file descriptor to set block mode for

block_mode — block mode to apply to socket_fd

Return Values

TRUE if block mode was successfully set for socket, FALSE otherwise.

Diagnostics

If TutSocketSetBlockMode fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TutSocketSetBlockMode sets the block mode of socket_fd. See TutSocketGetBlockMode on page 268 for more information on socket block modes. A value of TRUE for block_mode makes I/O operations blocking, and FALSE makes I/O operations non-blocking.

Caution

None

See Also

TutSocketSetBlockMode, TutSocketGetBlockMode

Examples

This example sets the block mode of a socket to FALSE:

if (!TutSocketSetBlockMode(socket_fd, FALSE)) { 
  /* error */ 
} 

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