|
Re: RE: No _IO_CONNECT not being sent to server on name_open()
|
10/09/2014 2:33 PM
post112012
|
Re: RE: No _IO_CONNECT not being sent to server on name_open()
By default name_attach () creates a channel with three flags set, one is the _NTO_CHF_DISCONNECT
Remove the ChannelDestroy and the ChannelCreate call from your code and you should be goog.
> Hello.
>
> I have a similar problem, but my server don't receive _PULSE_CODE_DISCONNECT.
>
> server:
> attach = name_attach(NULL, ATTACH_POINT, 0);
> ChannelDestroy(attach->chid); // here I try to set flag "
> _NTO_CHF_DISCONNECT"
> attach->chid = ChannelCreate(_NTO_CHF_DISCONNECT)
> while ( 1 )
> {
> rcvid = MsgReceive()
> if ( rcvid == -1)
> {}
> else if ( rcvid == 0 )
> {
> switch ( RxMsg.Mypulse.code)
> {
> case 0:
> // pulse from timre; it is work
> case _PULSE_CODE_DISCONNECT:
> // doesn't work
> }
> else
> {
> // parsing message, it is work
> }
> }
>
> client:
> server_coid = name_open(ATTACH_POINT, 0)
> while ( <condition> )
> {
> status = MsgSend()
> }
> name_close(server_coid);
> // when executed this line, server don't receive _PULSE_CODE_DISCONNECT
>
> Moreover, I try why running "gns" and whiout it.
>
> Anybody know how it is possible to decide this problem?
>
> THANK YOU VERY MUCH
|
|
|