Re: Forcing a server to accept given profiles

Sandro Poppi <[email protected]> Wed, 11 Dec 2002 10:21:53 +0100
Newsgroups gmane.network.beep.roadrunner.general
Message-ID <[email protected]>
Francis,

thanks for the hint. Will try it this way.

Regards,
Sandro

> > 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. ;)
> 


-- 
"Linux is like a wigwam: no windows, no gates ... apache inside!"

http://spoppi.home.pages.de/
http://www.lug-burghausen.org/