AMX DESIGN XPRESS V 1.5 - PROGRAMMER GUIDE Uživatelská příručka Strana 233

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 316
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 232
KwikNet TCP/IP Sockets
K
A
DAK
219
Description ...continued
Optionval is a pointer to the option value. The size of each option is
indicated in the option list. Note that
bool is an int value that is 1 if
the option is to be enabled or 0 if the option is to be disabled. The type
u/s long indicates a 32-bit value usually represented by an unsigned
long
. The structure linger required by option SO_LINGER is described
in header file KN_SOCK.H.
Optionlen is the length of the option value at the location referenced by
optionval.
Note Option SO_NONBLOCK is a unique KwikNet option which conditions a socket
such that subsequent socket operations proceed with or without blocking
the caller. Note that, although a socket is always a blocking socket when
first created, this option permits the mode of operation to be altered by
your application. The option value in the call must be non-zero to set
non-blocking mode or zero to restore the socket to blocking mode.
Returns If successful, a value of 0 is returned.
On failure, the error status -1 is returned.
The error indicator for socket s is set to define the reason for failure. Use
kn_errno() to retrieve the error code.
EBADF The socket descriptor s is invalid.
EINVAL One or more parameters are invalid or
parameter optionlen specifies a length that is less
than that required to specify the option.
ENOPROTOOPT The option is unknown at the level indicated.
EPERM The option cannot be set after a connection is
established.
See Also kn_getsockopt(), kn_socket()
Zobrazit stránku 232
1 2 ... 228 229 230 231 232 233 234 235 236 237 238 ... 315 316

Komentáře k této Příručce

Žádné komentáře