Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 8d31f1236fff009479c3ac2b1733256c > files > 8

pptp-linux-1.7.2-7.mga4.x86_64.rpm

Call Manager is a single-threaded application.
It's easier that way.
Nothing blocks except a select() call.

The pptp code provides an fd_set for us to watch, and a function
to call to see if a given event pertains to the pptp code.
Each CALL connection goes in the exceptions set, and is watched for close.
We need a separate list of these, to check against the fd_set when
an event happens.

Writes get copied in a queue, and are only written if the select says we
can.

Reads go in another queue -- non-blocking! -- and messages are made from
the queue as we are able.

We register callbacks on significant events (any and all of them, if
we please) which can trigger a close on a user unix socket, for
example.

Nomenclature:
  inet_read|write  ... TCP port 1723 PPTP control connection
  unix_read|write  ... Call manager Unix socket to pppd/gre.