Specifications

Chapter 18. TCP/IP
447
Syntax:
CALL
"SOCKET.FN3"
26 FAMILY%,
TYPE%,
PROTOCOL%,
SOCKFD%
Description: This function creates a socket from the specified protocol family, socket
type, and protocol layer and assigns it to a socket identifier.
BSD4.4 socket API equivalent: This function is equivalent to the BSD4.4
socket API socket() function.
Parameters:
FAMILY% Protocol family for the socket
TYPE%: Socket type
PROTOCOL% Protocol layer for the socket
The protocol family (
FAMILY%) must be 2, the value indicating the ARPA
Internet protocols.
The socket type (
TYPE%) must be one of the following values:
1 Stream socket
2 Datagram socket
3 Raw socket
The protocol layer (
PROTOCOL%) must be one of the following values:
1ICMP
6TCP
17 UDP
Return value:
SOCKFD% Socket identifier
Run-time errors:
Function #26: Create socket
Error code Meaning
218h
Too many sockets.
22Bh
This protocol family does not support the specified protocol type
and protocol.
237h
There is insufficient system area memory.