[Vortex] Auto-discard notification

Francis Brosnan Blazquez francis at aspl.es
Mon Dec 10 14:10:56 CET 2007


Hi Amiaux,

> Just to be sure, the sample application I provided also crash when I
> use 
> vortex_connection_shutdown on the listener and not 
> vortex_connection_close. Did you manage to reproduce it ?

Ok, I didn't test the other case. With the latest changes introduced,
I've updated your test case to allow creating any number of
vortex_init/vortex_exit cycles (with both cases). Check attachment..

> What I'm trying to achieve is to inform the vortex engine that it
> must 
> stop accept new connections on the specified listener (because I want
> to 
> actually stop the module)

For this case, I would use vortex_connection_shutdown (as used in your
updated example, followed by a vortex_exit). vortex_connection_close
includes BEEP logic that could lead to be able to close it (mostly
because the other side denies to close...)

> This raises another issue, how do I actually close connections opened
> by 
> one specified listener ? I assumed they were closed when killing the 
> listener. 

I've updated the vortex listener module to include a function that shutdown
the listener and all associated connections created due to its function.
 
  - vortex_listener_shutdown

See the minimal example I've attached. The example shutdowns a listener
(the one running at 1400 port, if the count is reached). This makes the
listener to stop running and all connections created on that listener
to be closed immediately.

Cheers!

> Thanks,
> AMIAUX Benoît
> 
> 



-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_vortex.c
Type: text/x-csrc
Size: 1114 bytes
Desc: not available
Url : http://lists.aspl.es/pipermail/vortex/attachments/20071210/bff50535/attachment.c 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shudown-listener.c
Type: text/x-csrc
Size: 1545 bytes
Desc: not available
Url : http://lists.aspl.es/pipermail/vortex/attachments/20071210/bff50535/attachment-0001.c 


More information about the Vortex mailing list