开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: server programming in "C"


 

Sir,
The change did not compile, something about a LVALUE needed.? BUT, I think you
are on the right track.? See below from ar_pf3 manual:

****
If you wish to code socket application in C, you must include a call to CARGENV (no parameters required)
in order to cause the socket routines to automatically convert the arguments passed to assembler calling
conventions. In this case, use the normal C calling conventions as defined by the SOCKET.HDR header file.
****

It appears that cargenv converts arguments from a "C" to something else.? Still digging.? WIll look at the
debugger to see what can be done.

Thank you very much for your help and interest.

Cheers
Tom c


Virus-free.


On Mon, Jun 21, 2021 at 10:40 AM Peter Coghlan <groups@...> wrote:
>
> with no change.? The program hangs on the:
> sock = socket (AF_INET, SOCK_STREAM, 0);
> code.
>

When you say hangs, do you mean hangs waiting for something or hangs stuck
in an infinte loop?

This is a complete wild guess.? Maybe CARGENV causes arguments passed by
value to socket routines to be somehow changed into arguments passed by
reference?? How about trying something like this as a test:

sock = socket (&AF_INET, &SOCK_STREAM, &0);

and see if it still hangs?

Maybe the MUSIC debugger could be used to get more details on what is
going wrong?? It might even be possible to figure out in what way the
arguments being passed to socket() from C are "wrong" which might in
turn allow a replacement for CARGENV to be written?

Regards,
Peter Coghlan.





Join [email protected] to automatically receive all group messages.