Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Server Termination detection from within the Client Process: (2 Items)
   
Server Termination detection from within the Client Process  
I have a Client Server model sending and receiving both custom messages and pulses, on the server side I am using 
name_attach and MsgReceive / MsgReceivePulse, on the client side I am using name_open and MsgSend / MsgSendPulse. 

I am attempting to determine if the server has terminated, I plan to use critail process monitoring to restart the 
server should it be terminated.

I would is possible rather not call name_open, MsgSendPulse, name_close every time I have message. 

On the client side I was hoping to do something like this:

name_open()

for(;;)
{ 

    ….
    ….
    ….
    ….

    status = MsgSendPulse_r()
    if(status !=EOK)
    {
         if(status == EBADF)
         {
              name_open()  
         }
    }
}

However MsgSendPulse_r always returns EOK, even when the server has been terminated and the entry in the namespace /dev/
name/local has been removed. 

Any ideas how I can achieve this.

Regards

William
Re: Server Termination detection from within the Client Process  
> I have a Client Server model sending and receiving both custom messages and 
> pulses, on the server side I am using name_attach and MsgReceive / 
> MsgReceivePulse, on the client side I am using name_open and MsgSend / 
> MsgSendPulse. 
> 
> I am attempting to determine if the server has terminated


_NTO_CHF_COID_DISCONNECT in ChannelCreate() on Your client's side.
requests that the kernel deliver the client a pulse when _a_ server goes away. It is possible for a client to have a 
channel ,a subsequent message-receive loop with a receive buf  what can hold a pulse the pulse will have  
_PULSE_CODE_COIDDEATH as code.

Hope this helps.
Jeevan