Re: Forcing a server to accept given profiles

Francis Brosnan Blázquez <[email protected]> 09 Dec 2002 18:09:25 +0100
Newsgroups gmane.network.beep.roadrunner.general
Organization Advanced Software Production Line, S.L.
Message-ID <[email protected]>
El vie, 06-12-2002 a las 18:47, Sandro Poppi escribió:
> Hi,
Hi.
> 
> How do I force a server to only accept connections from clients which
> support 2 or more given profiles like idxp AND tls? When I tell a server
> to support idxp and tls using rr_profile_registry_add_profile() twice it
> accepts clients which only support one of those profiles (logical OR).
> 
> I did not find a function that helps me to define that specific
> behaviour. Is there a chance to do this? And if yes, how ;)
> 
I'm going to try to answer you assuming you want your server to accept
inbound connection from clients that support idxp and tls at the same
time (or other profiles).

I think you need to implement your own profile and override the
server_init method of the RRChannel class, which is called when a start
request is received and before the start response is sent. 

[You will find a good example to do this and other important things in
the example profile which resides in the codefactory cvs.]

Then, your server_init function will use rr_connection_get_peer_profiles
to figure out what beep profiles does the client-side support, so if
your server don't like the client-side supported profiles you can close
the connection.

I didn't implement the solution that I'm telling you so don't expect so
much, but it sounds good. ;)

> TIA,
> Sandro
I hope it helps. 
Regard
-- 
Francis Brosnan Blázquez <[email protected]>
Advanced Software Production Line, S.L.