Reserved Identifiers
135
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
IP_CLIENT_OPEN
This function opens a port for IP communication with a server.
SLONG IP_CLIENT_OPEN
(INTEGER LocalPort,
CHAR ServerAddress[ ],
LONG ServerPort,
INTEGER Protocol)
Parameters:
•
LocalPort
: A user-defined (non-zero) integer value representing the local
port on the client machine to use for this conversation. This local port
number must be passed to
IP_Client_Close
to close the conversation.
•
ServerAddress
: A string containing either the IP address (in dotted-quad-
notation) or the domain name of the server to connect to.
•
ServerPort
: The port number on the server that identifies the program or
service the client is requesting.
•
Protocol
: The transport protocol to use:
1 = TCP
2 = UDP
3 = UDP with Receive
If this parameter is not specified, TCP (1) is assumed. The constants
IP_TCP
,
IP_UDP
and
IP_UDP_2WAY
can be used to specify this parameter.
Result:
This function always returns 0. Errors are returned via the
DATA_EVENT
ONERROR
method. The following errors may be returned:
2: General failure (out of memory)
4: Unknown host
6: Connection refused
7: Connection timed out
8: Unknown connection error
14: Local port already used
16: Too many open sockets
17: Local Port Not Open
Example:
IP_CLIENT_OPEN(PORT1, SvAddr, SvPort, IP_TCP)
Seethe
IP Communication
section on page 189 for more information.
Содержание NETLINX PROGRAMMING LANGUAGE
Страница 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Страница 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Страница 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Страница 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Страница 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Страница 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Страница 114: ...Mainline 98 NetLinx Programming Language Reference Guide FIG 1 Message and Mainline Processing in the NetLinx System...
Страница 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Страница 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Страница 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Страница 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...