MC-Basic:CONNECT

From SoftMC-Wiki
Revision as of 11:11, 27 November 2019 by Rasty (talk | contribs) (Added timeout)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Language: English  • 中文(简体)‎

Requests a TCP connection from the remote host.

Syntax

Connect(#<device number>, <ip address>,<port number>{,<port number>})

Type

<device number>: Long
<port number>: Long
<ip address>: string
<timeout>: Long

Range

<device number>: 1 to 255

<ip address>: IP address

<port number>: TCP port

Scope

Task

Limitations

  • Task only
  • Errors: Cannot connect
  • Optional Timeout from version 0.4.20.3r2

Examples

OpenSocket Options=1 as #200
Connect(#200,"127.0.0.1",6002)
print Input$(LOC(200), #200)
close #200

See Also