Share this page

# lrs_disable_socket

Sockets Functions

Disables an operation for a socket.

    int lrs_disable_socket( char *s_desc, int operation );

s_desc | A descriptor identifying a socket.
operation | The operation to disable: SEND, RECEIVE, SEND-RECEIVE.

The lrs_disable_socket function disables an operation for a socket. The operation to disable is specified with the operation argument. To disable receiving data, pass DISABLE_RECV as the operation . To disable sending data, pass DISABLE_SEND. To disable all activity, pass DISABLE_SEND_RECV.

This function is recorded during a Windows Socket session.

## Return Values

Windows Sockets Return Values

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

In the following example, the lrs_disable_socket function disables all send and receive operations for Socket 2.

    lrs_send("socket2", "buf28", LrsLastArg);

    lrs_receive("socket2", "buf29", LrsLastArg);

    lrs_disable_socket("socket2", DISABLE_SEND_RECV);

    lrs_close_socket("socket2");

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: