Author Topic: Possible BUG in _OPENCONNECTION  (Read 2345 times)

0 Members and 1 Guest are viewing this topic.

Offline leobarn

  • Newbie
  • Posts: 2
    • View Profile
Possible BUG in _OPENCONNECTION
« on: April 20, 2019, 05:30:45 am »
Hello,

I'm new to this board, just downloaded and installed QB64.
I like networking so did that.

newclient = _OPENCONNECTION(host) this give me a negative connectHandle of -3
This is no problem for _CONNECTIONADDRESS(newclient) this can handle negative numbers.
But INPUT #newclient, a is not working because INPUT can't handle negative numbers.

Is this a BUG or ??????

Kind regards,
Leo Barnhoorn.

FellippeHeitor

  • Guest
Re: Possible BUG in _OPENCONNECTION
« Reply #1 on: April 20, 2019, 07:57:31 am »
Negative numbers are used by QB64 to differentiate between a file and a TCP/IP connection, that's not the problem.

It's actually an old issue with PRINT/INPUT for TCP/IP (the wiki indicates they're only available up to version 0.954 of QB64: http://www.qb64.org/wiki/INPUT_(TCP/IP_statement)). You should stick to PUT/GET instead.

Here's an article you may find useful: https://www.qb64.org/articles/articletcpip.txt
« Last Edit: April 20, 2019, 08:23:12 am by FellippeHeitor »

Offline leobarn

  • Newbie
  • Posts: 2
    • View Profile
Re: Possible BUG in _OPENCONNECTION
« Reply #2 on: April 27, 2019, 08:23:23 am »
Hello Fellippe,

Thank you for the message.
It is clear now.

Kind regards,
Leo Barnhoorn.