[Vortex] votext_connection_new / on_accepted

Robert M. Münch robert.muench at robertmuench.de
Mon Apr 7 14:10:15 CEST 2008


On Sun, 06 Apr 2008 16:42:13 +0200, Robert M. Münch  
<robert.muench at robertmuench.de> wrote:

> Hi, is it correct that when the on_accepted handler is called the
> connection is yet not done? If, this should be clearly stated in the  
> docs.
>
> And, if I specify an on_accepted handler the docs state that the client
> peer is not blocked. This seems to be a bit strange to me. The client  
> peer wants to setup a connection. The server peer performs some tasks and
> indicates that a connection should be setup by returning TRUE.
>
> If the client peer is not blocked in this case, how can I know if a
> connection is ready or not? I think the client should block until a
> conneciton or error is returned.
>
> Or am I using the wrong approach?

Hi, answering to myself. The problem is solved. I screwed up a bit the  
different sides and which handler works on which side.

To summarize it for others:

BEEP strucutre follows a "request/response" model. Example: To transfer a  
file it's not possible to send it directly to a peer, the reciever must  
send a request and the response than is the file. So you have a three step  
ping-pong:

1. Sender announces file
2. Reciever requests file
3. Sender sends data

This pattern fits to the different handlers (first / second level) that  
you can provide for Profiles / Channels.

Best regards.

-- 
Robert M. Münch
http://www.robertmuench.de



More information about the Vortex mailing list