Dear Erich,

my apologies for not reading your answer thoroughly, I missed the delay that 
you had added in the server, now I can make it work exactly as intended. Thanks!

The question with sending data delayed to the address with is still something 
that I would like to have, there is one test case where I want to send some 
data first, then, after a delay, a further data. If there is a way to do that 
it would be great for the test.

Von meinen Macbook gesendet

Hälsningar/Regards/Grüsse,
P.O. Jonsson
oor...@jonases.se



> Am 10.11.2018 um 17:37 schrieb P.O. Jonsson <oor...@jonases.se>:
> 
> Dear Erich,
> 
> I can confirm that both scserver and sfserver works with r11517 (I was to 
> late for r11516)
> 
> With some modifications I could make the example code you provided work. 
> Almost.
> 
> Observation 1: it is not possible to send the <Enter> to the server because 
> then it will be closed before the clients are up&running.
> 
> Observation 2: It works to have two (or more) clients run in parallel, but 
> the output of the two instances gets gobbled up. To be able to parse the 
> output I added a small delay between the two clients (so they run in 
> succession).
> 
> Observation 3: as long as there are clients active the server will not exit, 
> also if you send it the <Enter>. Once all clients are closed the server will 
> exit though. I guess this is intended behavior.
> 
> In order to make this a test case I need a way to send input to the server 
> AFTER the clients have been started. I tried to start the clients first but 
> that does not work. I get a "SockConnect failed: ECONNREFUSED“ or "Connect 
> failed: ECONNREFUSED“ error message.
> 
> Is it possible in some way to send input to an "address with“ statement 
> delayed?
> 
> <clientservertest.rex>
> 
> Von meinen Macbook gesendet
> 
> Hälsningar/Regards/Grüsse,
> P.O. Jonsson
> oor...@jonases.se <mailto:oor...@jonases.se>
> 
> 
> 
>> Am 06.11.2018 um 18:52 schrieb Erich Steinböck <erich.steinbo...@gmail.com 
>> <mailto:erich.steinbo...@gmail.com>>:
>> 
>> Commit [r11516] <https://sourceforge.net/p/oorexx/code-0/11516/> should fix 
>> the issues.
>> 
>> can you advice how one can refer to two different terminal sessions in the 
>> same program (with the intention to start the scserver in one ADDRESS 
>> statement first and then the scclient in another ADDRESS statement
>> 
>> You might use something like below to run an automated test for sf/sc server 
>> plus two concurrent clients (the fix has also added a delayed shutdown 
>> feature for the servers to facilitate such automated testing):
>> 
>> ~~~
>> use arg prefix = "sc"
>> 
>> job = .Job~new(prefix)
>> job~start("server")
>> call SysSleep 0.5 -- wait for server to become ready
>> 
>> job~start("client")
>> job~start("client")
>> 
>> ::class job
>> 
>> ::method init
>>   expose prefix
>>   use strict arg prefix
>> 
>> ::method server
>>   expose prefix
>>   address "" "rexx" prefix || "server" with input using ("3")
>> 
>> ::method client unguarded
>>   expose prefix
>>   address "" "rexx" prefix || "client" with input using ((111, 222, 333, 
>> "x"))
>> ~~~
>> _______________________________________________
>> Oorexx-devel mailing list
>> Oorexx-devel@lists.sourceforge.net 
>> <mailto:Oorexx-devel@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
> 
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to