
Chapter 18. TCP/IP
479
Syntax:
CALL
"SOCKET.FN3"
.fcRcvfrom
SOCKFD%,
RECVBUFF$[()],
RECVLEN%,
RECVMODE%,
FAMILY%,
PORT%,
address,
RECVSIZE%
[,RECVFLAG%]
where
address
is
ADDRESS
or
IPADDRESS$
Description:
This function receives data sent to the UDP socket specified by the socket
identifier.
BSD4.4 socket API equivalent: This function is equivalent to the BSD4.4
socket API recvfrom() function.
Parameters:
SOCKFD%
Socket identifier
RECVBUFF$[()]
Receive buffer
RECVLEN%
Maximum number of bytes to receive
RECVMODE%
Receive mode
RECVFLAG%
Storage method (optional)
The receive buffer (
RECVBUFF$
) can be either a string non-array or string
array variable. The maximum size for a string non-array is 255 bytes; for a
string array, 4096.
The receive mode (
RECVMODE%
) must be one of the following values:
The protocol family (
FAMILY%
) must be 2, the value indicating the ARPA
Internet protocols.
The storage method (
RECVFLAG%
) is required for a string array buffer. It
is ignored for a string non-array variable and new data will be written.
The storage method (
RECVFLAG%
) must be one of the following values:
Note: If
RECVFLAG%
is 0 or omitted, the user application program must
initialize the receive buffer string array variable before receiving any data.
Return value:
FAMILY%
Protocol family of sending station
PORT%
Port number of sending station
ADDRESS
Address of sending station
IPADDRESS$
Address of sending station in dotted quad notation
RECVSIZE%
Number of bytes received
.fcRcvfrom
Receive data sent to the specified UDP socket
.soRvNrm
0
Normal
.soRvPeek
2
Peek at next message
.soINet
2
ARPA Internet protocols
.soRvApend
0
Append data to buffer (default if omitted)
.soRvWrite
1
Overwrite buffer with data
Содержание BHT-BASIC 100 SERIES
Страница 1: ......
Страница 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...
Страница 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...
Страница 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...
Страница 192: ...Chapter 14 Statement Reference 184 Example OPEN master Dat AS 1 FIELD 1 20 AS bar 10 AS ky CLFILE 1 CLOSE 1...
Страница 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...
Страница 349: ...341 Run time errors Error code Meaning 05h Parameter out of the range checktype is out of the range...
Страница 383: ...375 Run time errors Reference Error code Meaning 05h Parameter out of the range Functions LEFT LEN and RIGHT...