newbie: developping inetd subserver

newbie: developping inetd subserver

Post by Pierre Wiese » Mon, 11 Sep 2000 03:51:43



Hi,

As I have small time left, I'm currently trying to write a small C/S
appplication. The server-side should be a subserver of inetd...

I've understood that the server receives its messages on STDIN. So, I
can send and log a simple message to my server.

But I didn't found any responses on two points:

- how can my server get informations about the client which is sending
the message ? (or how can I get a socket when the connection is handled
by inetd ?)

- how can my server response to the client ? Should it open a new
connection or can it response via inetd ?

Thanks in advance for your help
Regards

Pierre

 
 
 

newbie: developping inetd subserver

Post by Juergen Hein » Mon, 11 Sep 2000 07:54:53



>Hi,

>As I have small time left, I'm currently trying to write a small C/S
>appplication. The server-side should be a subserver of inetd...

>I've understood that the server receives its messages on STDIN. So, I
>can send and log a simple message to my server.

>But I didn't found any responses on two points:

>- how can my server get informations about the client which is sending
>the message ? (or how can I get a socket when the connection is handled
>by inetd ?)

[-]

You don't. inetd gets the socket for you.

Quote:>- how can my server response to the client ? Should it open a new
>connection or can it response via inetd ?

[-]
You do not communicate via inetd but again via the standard file
descriptors.

Cheers,
Juergen

--
\ Real name     : Jrgen Heinzl         \       no flames      /


 
 
 

newbie: developping inetd subserver

Post by roger Irwi » Sat, 16 Sep 2000 04:00:00



> Hi,

> - how can my server get informations about the client which is sending
> the message ? (or how can I get a socket when the connection is handled
> by inetd ?)

> - how can my server response to the client ? Should it open a new
> connection or can it response via inetd ?

You can simply read and write to stdin and stdout, but it has limitations.
File descriptors are more versatile. I do this kind of work with Python,
and I simply request the file descriptors for stdin and stdout file
handles. These are socket file descriptors so then I can use them as such.
 
 
 

1. socket beginner: developping inetd subserver

Hi,

As I have free time, I'm currently trying to write a small C/S
appplication. The server-side should be a subserver of inetd...

I've understood that the server receives its messages on STDIN. So, I
can send and log a simple message to my server.

But I didn't found any responses on two points:

- how can my server get informations about the client which is sending
the message ? (or how can I get a socket when the connection is handled
by inetd ?)

- how can my server response to the client ? Should it open a new
connection or can it response via inetd ?

Thanks in advance for your help
Regards

Pierre

2. Diamond Stealth 3D 2000 -- HOWTO?

3. Newbie getting started developing in X

4. ? Way to tell when person reads mail

5. What is the best(easiest) GUI developing tool for a newbie?

6. Free ISPs that Support Linux?

7. print subserver can't see /dev/usb/lp0

8. can select with infinite timeout return 0

9. lpr subserver not exiting

10. Q inetd/sockets: how to run my daemon from inetd???

11. multiple inetd spawning from an inetd

12. Restart inetd or reboot without using console...when inetd is dead

13. troubles with inetd / inetd.conf