Difference between revisions of "MC-Basic:CONNECT"
(fixed example) |
|||
Line 42: | Line 42: | ||
|EXAMPLE= | |EXAMPLE= | ||
− | OpenSocket Options=1 as #200 | + | OpenSocket Options=1 as #200<br> |
− | Connect(#200,"127.0.0.1",6002) | + | Connect(#200,"127.0.0.1",6002)<br> |
− | print Input$(LOC(200), #200) | + | print Input$(LOC(200), #200) <br> |
− | close #200 | + | close #200<br> |
|SEE ALSO= | |SEE ALSO= |
Revision as of 10:36, 18 July 2019
Language: | English • 中文(简体) |
---|
Requests a TCP connection from the remote host.
Syntax
Connect(#<device number>, <ip address>,<port number>)
Type
<device number>: Long
<port number>: Long
<ip address>: string
Range
<device number>: 1 to 255
<ip address>: IP address
<port number>: TCP port
Scope
Task
Limitations
- Task only
- Errors: Cannot connect
Examples
OpenSocket Options=1 as #200
Connect(#200,"127.0.0.1",6002)
print Input$(LOC(200), #200)
close #200