Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
248 user(s) are online (157 user(s) are browsing Forums)

Members: 0
Guests: 248

more...

Headlines

 
  Register To Post  

How to know if a port is a ARexx port ?
Just can't stay away
Just can't stay away


See User information
Hi,
I'm playing with the Exec PortList to send some AREXX messages to open ports.

But I wanted to know if I can be sure that the destination port will accept ARexx messages,
For example, when I send ARexx message to WORKBENCH, YAM, SIMPLEMAIL.1 or OWB.1 port, it works great.

But when I send ARexx message to SFS handler port or AMIDOCK port, for example,t it freezes my program just after the PutMsg function.

Edit : I use the rexx.c of Thomas Rapp method to send messages
http://thomas-rapp.homepage.t-online.de/examples/rexx.c

And I have tried, too, the AmiWest ARexx tutorial sample "example 1 : sending ARexx messages"
http://wiki.amigaos.net/index.php/AmiWest_Lesson_8
But same results.

PS : nothing to do with ARexx, but I have noticed that in the ProcTree sample of AmiWest tutorial, there is a function DOS/GetPID, I didn't found it on the SDK...
Is my standard SDK incomplete ?

Thank , by advance, for your help

Go to top
Re: How to know if a port is a ARexx port ?
Just popping in
Just popping in


See User information
I only know how to get a ports list in rexx which is different to what you want

What about getting an arexx port list result and processing that?

You only need to know that the arexx and rexx msgports exist

Would that work for you?

/**/
Address REXX; Echo Show(P)

Is what I can think of right now

Go to top
Re: How to know if a port is a ARexx port ?
Just popping in
Just popping in


See User information
@zzd10h

What messages would you send? Each app responds to different ARexx messages?

Go to top
Re: How to know if a port is a ARexx port ?
Just can't stay away
Just can't stay away


See User information
@belxjander :
Thank you, i still have the full Port list by scanning the List
SysBase->PortList.

But I have to try if your REXX command lists the same port than mine or just the ARexx port. If yes, I could make a compare to see the ARexx ones.

I wanted the full list to add to my program SysMon. After that, I thought that it can be useful for testing purpose to have the ability to send ARexx messages to Port.

@steady
Yes, you are true but when I send a fake message (ex.: arehdjsizieo) to an ARexx port, it doesn't make freezed my program. I have a return code <> 0, that's all.

This freeze occurs only when I send message to ports like AMIDOCK or "SFS handler".

Therefore, I think that these ports are not ARexx port (not sure about that) and it's for that that I wanted to know if it was possible to recognize them ;)

Thanks to you 2 for your help

Go to top
Re: How to know if a port is a ARexx port ?
Home away from home
Home away from home


See User information
As I've implemented my own ARexx port (for receiving ARexx messages)... off the top of my head I don't think there is any way to know if a port is intended for ARexx or not. Public ports are named, on the assumption that the sender will know what to send to them. ARexx ports are just one example of that.

Sending ARexx messages to non-ARexx ports is likely to crash the receiving program, and possibly corrupt memory (leading to a system crash).

Author of the PortablE programming language.
Go to top
Re: How to know if a port is a ARexx port ?
Home away from home
Home away from home


See User information
There is no way to determine if a port is an ARexx Port or not.

An ARexx port is just a publicly named message port.

You simply must not send speculative messages to ARexx ports. (or any other kind of port) unless you know in advance (from program documentation or similar) that a named port is in fact an ARexx port.

The ports list, however you aquire it, should only be used to determine if the port you are looking for is present, not to attempt to guess at available ARexx ports.


Go to top
Re: How to know if a port is a ARexx port ?
Just can't stay away
Just can't stay away


See User information
Thank you for your responses.
Yes, I confirm, it's dangerous to send ARexx messages to a non ARexx port :)

Bexjlander :
I try the SHOW(P), it lists the same ports than PortList.
According to the response of Broadblues and ChrisH, it's normal.

Thank to all of you, it's nice to have responded.


Edited by zzd10h on 2012/12/27 21:35:30
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project