svc_pollfd Global Variable

Purpose

Points to an array of the pollfd_t structures representing the read-file descriptor of a remote procedure call (RPC) server.

Library

Network Services Library (libnsl.a)

Syntax

#include <rpc/rpc.h>
pollfd_t *svc_pollfd

Description

The svc_pollfd global variable is a read-only global variable pointing to an array of the pollfd_t structures representing the read-file descriptor of an RPC server. Use this variable only when the svc_run subroutine is not used and the server wants to handle RPC service requests asynchronously. The value of the variable might change when the svc_getreq_poll subroutine is called or when other RPC service handle-creation subroutines are called. By default, the svc_pollfd global variable contains 1024 entries. You can change the value using the rpc_control subroutine.

Note: Do not pass the address of this variable to any of the select subroutines. Pass a copy of the address instead.