LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to display a custom message when xinetd rejects a connection? (http://www.linuxquestions.org/questions/linux-networking-3/how-to-display-a-custom-message-when-xinetd-rejects-a-connection-4175439823/)

a2326 12-03-2012 12:23 PM

How to display a custom message when xinetd rejects a connection?
 
Hello all,
I would like to display a message to the client when xinetd rejects the connection that the client tried to establish.

The client sends a text message to a port where xinetd is listening. If the server script is already in use a new instance of this script won't be created and the connection will be rejected. In this case, I want the client user to know that one instance of the script is already running. How could this be accomplished? Thanks in advance for any idea.

nini09 12-03-2012 03:25 PM

The server code should allow to accept multi instance. The new client send new request and it use new instance.

a2326 12-03-2012 03:35 PM

But how I need a single instance and if this instance is already in use and someone else sends a request to xinetd, he should receive a message.

nini09 12-04-2012 04:19 PM

If you want that client receive a message when server is servering antoher client. You can do following thing.
On server side, allow multi incoming connection. If server is severing another client, it send back error message to client.


All times are GMT -5. The time now is 10:45 AM.