Progress
Version 9
Product Update Bulletin


SET-SOCKET-OPTION( ) Method

Sets the specified socket option. TCP supports a number of socket options. Please refer to TCP documentation for a description of these options.

Return Type: LOGICAL

Applies To: Socket System Handle

SYNTAX

SET-SOCKET-OPTION( name , arguments ) 

name

A character expression which indicates the name of the socket option to be set.

arguments

A character expression that contains a comma separated list of arguments specific for the option.

Table D–13 describes the options Progress supports.

Table D–13: Options For SET-SOCKET-OPTION()
Option
Description
TCP-NODELAY
An enable indicator, which is either TRUE or FALSE.
SO-LINGER
Two comma separated values:
  1. The onoff indicator, which is either TRUE or FALSE.
  2. The linger time. If the onoff indicator is FALSE, the linger time does not need to be provided.
SO-KEEPALIVE
Sets the TCP socket option SO_KEEPALIVE
Set arguments to TRUE to turn this option on or to FALSE to turn it off.
SO-REUSEADDR
Sets the TCP socket option SO_REUSEADDR.
Set arguments to TRUE to turn this option on or to FALSE to turn it off.
SO-RCVBUF
SO-SNDBUF
Sets the TCP socket option SO_RCVBUF or SO_SNDBUF.
Set arguments to the desired size of the buffer.

NOTE: Depending on your platform, the value you supply might be increased to the platform’s minimum buffer size, decreased to the platform’s maximum buffer size, or rounded up to the next multiple of the platform’s segment size. For more information, see your platform’s documentation.

SO-RCVTIMEO
Sets the time-out length — that is, the number of seconds the socket waits to receive data before timing out.
Set arguments to the desired time-out value in seconds.
If a time-out occurs, READ() returns TRUE and the value of BYTES-READ is zero. This is true whether the READ() mode is READ-AVAILABLE or READ-EXACT-NUM.
For more information on the interaction of READ(), the READ() mode, and SO_RCVTIMEO, see the “Sockets” chapter of the Progress External Program Interfaces manual.

The SET-SOCKET-OPTION( ) method returns TRUE if setting the option succeeded and returns FALSE otherwise. An error can occur if:


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095