inetd or super-server in D :-)
Janderson
ask at me.com
Wed Sep 17 08:53:19 PDT 2008
Robert wrote:
> Janderson Wrote:
>
>> Robert wrote:
>>> I code super-server in D(simple implementation of something like "inetd" does). To select attempt of connection I use modules of class Selector. My problems:
>>> - how super-server can realize the port of connection request of the client, to provide proper request-handle procedure?
>>> -after "fork" do I just trigger "exec" with proper server as an argument of the function ?
>>> -should I trigger everything via TCPD? (because simple version with exec(serverd,....) doesn't work properly on my ubuntu)?
>>> - to close all file descriptors I have problem with usage of NOFILE const or RLIMIT_NOFILE?
>>> how this thing should look in D?
>>> Thanks for any tips.
>> Hi Robert I don't have the answer to your problem, sorry. However you
>> might try posting in your native language as well. You might get lucky.
>
> So my english is so bad?
>> -Joel
>
Hi Robert, I didn't mean any offense by my message. Also note I'm
not the best English speaker in the world myself, even though it is my
native language. I've put * where I've made comments.
If I was to translate what I thought you meant I would write:
>>> I code super-server in D(simple implementation of something like
"inetd" does). To select attempt of connection I use modules of class
Selector. My problems:
I coded a super-server in D which is similar to "inetd". To initate a
connection I used the class Selector Module. Anyway how can I solve
these problems:
* ? What is super-server. Context would help when trying to translate this.
>>> - how super-server can realize the port of connection request of
the client, to provide proper request-handle procedure?
* I'm not exactly sure what you mean here but I'll take 2 stabs *
- How can I find the port the client made the request on.
- How can I hand shake with the client to make a connection to the server.
>>> -after "fork" do I just trigger "exec" with proper server as an
argument of the function ?
- Do I trigger "exec" with the ??proper server?? as an argument of the
function after a "fork"?
* ?? What is proper server?
>>> -should I trigger everything via TCPD? (because simple version with
exec(serverd,....) doesn't work properly on my ubuntu)?
- should I trigger everything via TCPD? The simple version with
exec(serverd,....) doesn't work properly on ubuntu for me.
* Ok, I think that was written in an understanding way ;)
>>> - to close all file descriptors I have problem with usage of NOFILE
const or RLIMIT_NOFILE?
- NOFILE const or RLIMIT_NOFILE doesn't seem to close all file
descriptors. Any suggestions?
* Technically you might provide more information here.
>>> how this thing should look in D?
How would the code for my app look in D?
I guess if someone took a little more time they may have been able to
translate some of what you where asking. I guess one of the main things
you do is leave out "a"'s and "the"'s. I hope that was helpful.
-Joel
More information about the Digitalmars-d
mailing list