
Chapter 18. TCP/IP
443
Syntax:
CALL "SOCKET.FN3" 22 SOCKFD%, SENDBUFF$[()],
SENDLEN%, SENDMODE%, SENDSIZE%
Description: This function transmits data from the specified buffer to the IP address and
port number connected to the specified socket identifier.
BSD4.4 socket API equivalent: This function is equivalent to the BSD4.4
socket API send() function.
Parameters:
SOCKFD% Socket identifier
SENDBUFF$[()] Transmit buffer
SENDLEN% Number of bytes to transmit
SENDMODE% Transmit mode
The transmit buffer (
SENDBUFF$) can be either a string or string array
variable. The maximum size for a string is 255 bytes; for a string array,
4096.
The transmit mode (
SENDMODE%) must be one of the following values:
0Normal
1 Out of band data
4 Bypass pathway control function
Return value:
SENDSIZE% Number of bytes transmitted
Run-time errors:
Function #22: Send message to another TCP socket
Error code Meaning
105h
Power-off detected. (BHT-7500S only)
209h
Socket identifier is invalid.
228h
The maximum number of bytes to receive is too small.
237h
There is insufficient system area memory.
239h
The specified socket is not connected.
23Ah
The specified TCP socket has been closed.
241h
There is no connection pathway to the host for UDP socket.
Komentáře k této Příručce