Share on Facebook Share on Twitter Email
Answers.com

setsockopt

 
Win API: setsockopt
 

The Windows Sockets setsockopt function sets a socket option.

VB4-32,5,6

Declare Function setsockopt Lib "wsock32.dll" ( _
ByVal s As Long, _
ByVal Level As Long, _
ByVal optname As Long, _
optval As Any, _
ByVal optlen As Long _
) As Long

Operating Systems Supported
Requires Windows Sockets 2.0

Library
wsock32.dll

Parameter Information
· s

[in] A descriptor identifying a socket.
· level

[in] The level at which the option is defined; the supported levels include SOL_SOCKET and IPPROTO_TCP. See Protocol-specific Annex (a separate document included with the Win32 SDK) for more information on protocol-specific levels.
· optname

[in] The socket option for which the value is to be set.
· optval

[in] A pointer to the buffer in which the value for the requested option is supplied.
· optlen

[in] The size of the optval buffer.

Return Values
If no error occurs, setsockopt returns zero. Otherwise, a value of SOCKET_ERROR is returned, and a specific error code can be retrieved by calling WSAGetLastError.

Examples
- Download File

Related Functions
- getsockopt

Search unanswered questions...
Enter a word or phrase...
All Community Q&A Reference topics
 
 
Learn More
TCP hole punching
File descriptor
Ioctl

Post a question - any question - to the WikiAnswers community:

 

Copyrights:

Win API. AllAPI.net Copyright © 1998-2001, The KPD-Team  Read more