|
Pages: [1]
|
 |
|
Author
|
Topic: more port problems (Read 405 times)
|
|
fhein
|
It seems like wait (for a port) generates an event when the client closes the connection due to a timeout. This causes my program to launch the code "first port" which generates the following error message:
** Script Error: Out of range or past end ** Where: switch ** Near: either debug: temp: first port
How can I test the port if there's data to read?
And another question, if I'm not ready to handle more data yet, can I just stall the port by not reading from it? What happens when the buffer fills up?
----
Just thought of something.. If I use write-io to send some stuff to a no-wait port, will this cause my program to pause execution until it's transfered or is it asynchronous?
----
The problems are just building up.. Can't I write to a port while there's data on it waiting to be read?
|
|
|
|
« Last Edit: June 01, 2005, 11:51:37 PM by fhein »
|
Logged
|
|
|
|
|
Gabriele
|
1) Is that a /LINES port? You can use PICK instead of FIRST, it will return NONE instead of giving you an error. Alternatively, you can wrap the call to FIRST into ATTEMPT so that you get a NONE in case of error. You don't need to read the data immediately, but if you don't read from it the port will remain in awaken state.
2) WRITE-IO (as all other functions) is synchronous, unless you use async-modes.
3) You can write to a port if there is data to read.
|
|
|
|
|
Logged
|
|
|
|
|
|
Pages: [1]
|
|
|
 |