Sending Data - Jetter JC-120MC User Manual

Table of Contents

Advertisement

10 Programming

Sending data

Introduction
Function declaration
Function parameters
Return value
Using this function with
a TCP/IP connection
492
Data can be sent via a previously established TCP/IP connection or via a
UDP/IP connection of a client.
Via UDP/IP connection of a server data cannot be sent, but only received.
Function
ConnectionSendData(IPConnection:Int,
Description of the function parameters:
Parameter
IPConnection
IPAddr
IPPort
SendData
The following return values are possible:
Return value
0
Data have been sent successfully.
-1
Error when sending, e.g. connection interrupted.
-3
Invalid handle, e.g. sending via a UDP/IP server.
If data are to be sent via a TCP/IP connection, you can invoke the function
and assign the return value of a variable for further evaluation as follows:
Result := ConnectionSendData(hConnection,
IPAddr:Int,
IPPort:Int,
Const Ref
SendData,
DataLen:Int):Int;
Value
Handle
Valid IP address
Valid IP port number
Address of the data block
to be sent
1 ... 4,000
0,
0,
SendBuffer,
SendLen);
Comment
Return value of the function
ConnectionCreate()
Required only for UDP/IP
client
Required only for UDP/IP
client
Data block length in bytes
Jetter AG

Advertisement

Table of Contents
loading

Table of Contents