Hi, I've created two basic programs that exchange data over the network.
one sends text strings, the other receives and writes them to the screen
The program that send send is as follows:
10 CLS
20 OPEN # 3, N1_PIPE_TEST
30 REPeat CR_LOOP
40 INPUT "TEXT:"; A $
50 PRINT # 3, A $ & CHR $ (10)
60 END REPeat CR_LOOP
the one who is receiving and printing
100 CLS
110:
120 OPEN_IN # 3, PIPE_TEST
130:
140 REPeat CR_LOOP
150 INPUT # 3, A $
160 PRINT A $
170 END REPeat CR_LOOP
Obviously, the file server was launched on the latter (by saying FSERVE)
It works perfectly well, the only strangeness (and that's why I'm writing to you) is that a "delay" of a string in receiving data.
Let me explain with an example
- I write "HI"
. I receive nothing
- I write "HOW ARE YOU?"
. I receive "HI"
- I write "ALL GOOD?"
. I receive "HOW ARE YOU?"
..and so on..
What I do not understand is whether I'm wrong or it works just like that
Giorgio
Pipe "problem"
- Giorgio Garabello
- Gold Card
- Posts: 299
- Joined: Tue Jun 30, 2015 8:39 am
- Location: Turin, Italy
- Contact:
-
- RWAP Master
- Posts: 2893
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: Pipe "problem"
I assume you have set NET 1 on the fileserver QL and NET 2 on the sending QL (otherwise they both have the same network address which might cause an issue).
It is also unclear - is PIPE_TEST a named PIPE (which only works under SMSQ/e on the fileserver or if you have installed a named pipe toolkit on the fileserver). If not, then it might be trying to create a file called PIPE_TEST in the default directory on the fileserver, which might cause the delay without a FLUSH command.
In either case, you might need to use FLUSH (or FLUSH_CHANNEL command from the DJ Toolkit ) - http://superbasic-manual.readthedocs.io ... html#flush
If you are writing to a temporary file on the fileserver, then specify the device name in the first program as: 20 OPEN # 3, N1_RAM1_PIPE_TEST (for example)
It is also unclear - is PIPE_TEST a named PIPE (which only works under SMSQ/e on the fileserver or if you have installed a named pipe toolkit on the fileserver). If not, then it might be trying to create a file called PIPE_TEST in the default directory on the fileserver, which might cause the delay without a FLUSH command.
In either case, you might need to use FLUSH (or FLUSH_CHANNEL command from the DJ Toolkit ) - http://superbasic-manual.readthedocs.io ... html#flush
If you are writing to a temporary file on the fileserver, then specify the device name in the first program as: 20 OPEN # 3, N1_RAM1_PIPE_TEST (for example)
Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
- Giorgio Garabello
- Gold Card
- Posts: 299
- Joined: Tue Jun 30, 2015 8:39 am
- Location: Turin, Italy
- Contact:
Re: Pipe "problem"
yes. correct.RWAP wrote:I assume you have set NET 1 on the fileserver QL and NET 2 on the sending QL (otherwise they both have the same network address which might cause an issue).
yes, i'm on qpc2.It is also unclear - is PIPE_TEST a named PIPE (which only works under SMSQ/e on the fileserver or if you have installed a named pipe toolkit on the fileserver).
Flush!!!!!!!
If not, then it might be trying to create a file called PIPE_TEST in the default directory on the fileserver, which might cause the delay without a FLUSH command.
In either case, you might need to use FLUSH (or FLUSH_CHANNEL command from the DJ Toolkit ) - http://superbasic-manual.readthedocs.io ... html#flush
many thanks!!
Quantum Technology
http://www.hunggartorino.it/ql/language/en/
http://www.hunggartorino.it/ql/language/en/
-
- Aurora
- Posts: 889
- Joined: Mon Nov 24, 2014 2:03 pm
Re: Pipe "problem"
Hi,
Concerning the original posting, I note that after Line 60 there is no CLOSE#.
I have not been able to test your code, but this may be the problem?
Regards,
Steve Poole.
Concerning the original posting, I note that after Line 60 there is no CLOSE#.
I have not been able to test your code, but this may be the problem?
Regards,
Steve Poole.
- Giorgio Garabello
- Gold Card
- Posts: 299
- Joined: Tue Jun 30, 2015 8:39 am
- Location: Turin, Italy
- Contact:
Re: Pipe "problem"
is only a test, there's no exit form the loopstevepoole wrote:Hi,
Concerning the original posting, I note that after Line 60 there is no CLOSE#.
I have not been able to test your code, but this may be the problem?
Regards,
Steve Poole.
Giorgio
Quantum Technology
http://www.hunggartorino.it/ql/language/en/
http://www.hunggartorino.it/ql/language/en/
- Giorgio Garabello
- Gold Card
- Posts: 299
- Joined: Tue Jun 30, 2015 8:39 am
- Location: Turin, Italy
- Contact:
Re: Pipe "problem"
FLUSH
IT CAN BE DONE!!!

IT CAN BE DONE!!!


Quantum Technology
http://www.hunggartorino.it/ql/language/en/
http://www.hunggartorino.it/ql/language/en/