![]() ZBasic System Library
ZBasic Microcontrollers
27
Type
Function returning Integer
Invocation
Net.Connect(handle, ipAddr, port, protocol)
Parameter
Method
Type
Description
handle
ByVal
anyIntegral
The handle, previously returned by Net.Open(), to use.
ipAddr
ByVal
UnsignedLong
The IP address of the remote host.
port
ByVal
anyIntegral
The port number to use.
protocol
ByVal
anyIntegral
The protocol indicator.
Discussion
This function attempts to establish a connection to a remote host on the given port number. The protocol
parameter indicates the desired protocol according to the table below.
Protocol Designators
Value
Meaning
0
Use the TCP protocol.
1
Use the UDP protocol.
The return value will be zero if successful, negative otherwise.
|