Re: Unix Sockets

Meredydd <[email protected]> Sat, 30 Aug 2003 13:45:59 +0100
Newsgroups gmane.network.everybuddy.user
Message-ID <[email protected]>
On Saturday 30 August 2003 13:44, Jeroen wrote:
> Is there some documentation on the communication between core and
> (G)UI? I would like to study it some time.
core/doc/GUI_SPEC - full docs for the UI comms protocol. You can try it 
out with the simple client in the core/GUIcomms/ directory, although 
the interface is a bit arcane. The source is probably your best guide 
for that. Writing a better (more user-friendly) UI tester is a job I 
have lined up for myself sometime - shouldn't be too difficult (famous 
last words)...

Meredydd

> For now I am thinking about the streamlining. I wonder if there
> should not be some way of security in there too. Because now,
> everybuddy ;) is able to connect to the core from any computer, if
> they have the right cookie information, right?
Right. The cookie is all the access control we have. It's 8 bytes of 
random data, made up as the core starts (unless it's specified on the 
command line with the --cookie option). When a UI connects, it sends 
these 8 bytes as the first thing it does. If they're correct, normal 
commands start being sent. If not, you get a {"cookie_rejected"} and 
the core drops the connection.

> If I think of something I will let you know.
Please do!

Meredydd