Previous Topic: &SOCKET GETHOSTBYNAME

Next Topic: &SOCKET PING


&SOCKET OPEN

Creates a UDP socket.

&SOCKET OPEN [ PORT=port_id ]

OPEN is used to create a socket with a specified UDP port.

Operands:

PORT=port_id

Specifies the port number to be associated with the new socket. Port numbers have a range of 0 to 65535 with the default being 0, in which case the system allocates its own port number.

Examples: &SOCKET OPEN

&SOCKET OPEN PORT=&PRT

Return Codes:

0

Open successful

8

Open failed; see &ZFDBK for reason code, &ZSOCERRN and &ZSOCVERR for further error information.

Notes:

This verb is executed only by applications that want to use UDP sockets.

You need to do an &SOCKET OPEN before using &SOCKET SEND_TO or &SOCKET RECEIVE_FROM.

The information returned is set into the following NCL variables:

Some TCP/IP interfaces, for example Fujitsu TISP, have special requirements regarding pre-definitions of ports.

More information:

&SOCKET SEND_TO

&SOCKET RECEIVE_FROM

&SOCKET CLOSE