13.09.2006, 20:28
общий
это ответ
Здравствуйте, Александр Михайлович!
Лучше использовать MSDN, там точно вы найдете все интересующие вас функции.
The socket function creates a socket that is bound to a specific service provider.
SOCKET socket(
int af,
int type,
int protocol
);
Parameters
af
[in] Address family specification.
type
[in] Type specification for the new socket.
The following are the only two type specifications supported for Windows Sockets 1.1:
Type Meaning
SOCK_STREAM Provides sequenced, reliable, two-way, connection-based byte streams with an OOB data transmission mechanism. Uses TCP for the Internet address family.
SOCK_DGRAM Supports datagrams, which are connectionless, unreliable buffers of a fixed (typically small) maximum length. Uses UDP for the Internet address family.
In Windows Sockets 2, many new socket types will be introduced and no longer need to be specified, since an application can dynamically discover the attributes of each available transport protocol through the WSAEnumProtocols function. Socket type definitions appear in Winsock2.h, which will be periodically updated as new socket types, address families, and protocols are defined.
protocol
[in] Protocol to be used with the socket that is specific to the indicated address family.