[Vortex] vortex_connection_set_receive_handler

Robert M. Münch robert.muench at robertmuench.de
Thu Jan 1 16:16:31 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA384

Hi, first I want to wish all a good 2009 and hope that vortex development keeps going as in 2008.

I want to implement my own send/receive functions using vortex_connection_set_receive_handler etc. like the TLS profile does. I have looked at the TLS profile code and the docs and have some questions about all this stuff:


1. Is it enough to implement the VortexReceiveHandler and r VortexSendHandler or do I have to deal with all the vortext_io_waiting_* stuff as well? The docs state that 

"Previous handlers must be defined as a whole, it is not possible to only define a certain piece reusing the rest of the handlers. If the handlers are properly implemented, they will allow Vortex Library to perform IO operation with the API you have provided."  

But it's not clear to me what "previous handlers" means. Only the vortex_io_* handlers or all mentioned in the section?


2. The TLS profile uses a mutex inside the Receive/Send handler. For what is this one used? Is it to ensure that there is no race condition corrupting the read/write buffers of the SSL stuff? Is it necessary that the Receive/Send handler are re-entrant?


3. What does vortex lib expect as return codes? In the TLS example I can see that -1 or -2 is returned in case of an error. Which value do I have to return in which cases?


4. I thought that a profile is used to put application semantics to a channel. TLS is more like a wrapper for normal BEEP communication. Am I right that when using TLS, first there is a TLS-ified connection made, than the normal BEEP protocol is tunneld through this TLS connection? Or is the TLS property only attached to specific channels?

What I need to do is, to transparently provide send/receive functions to Vortex, without having to patch the library.

Best regards.

- -- 
Robert M. Münch
Management and IT freelancer
http://www.robertmuench.de

-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.9.0 (Build 397)
Charset: iso-8859-15

wsBVAwUBSVzeT3SQa/BbHGLwAQl/gAf/Yi/3G8kwZNIV8FAxCzPl9Xg9JhSMaTnb
OP3Kdbbkywx6ajp7vX2WzKCyfdM4/Zi7AByat3iqkH6h7yNZCxJrb5qt9y7PJXgz
TCurQv0X+WGm8x3IqH7CzqgAkUiLY8tIQFVlQ963vH4Y7qx7kIAHG1oa5de5UYk2
XU4bh0VkAMXL+WcPAGBXA4q6Dx3c3jwx9aYbCNqnUAdAZKgXe9rXNuwvMInMdaMV
cG0rRY/Fo3gGx4osYX4fLxqirxPFm8Ax5CReNzabQ15nwQJCWRcRYW7iFr+rCsaF
s8Y8kSHAjCXNmRYLs9ipaThrZoK4U2d+vJ/GWMf4xly3i35OYSDFSw==
=ncRc
-----END PGP SIGNATURE-----


More information about the Vortex mailing list