|
||||
![]() |
This project was initiated by the need to connect a HP
Laserjet 4 directly to our local network. Because we wanted to send data
directly to the printer without crossing any central spooler I had to develop
a special printer daemon. This daemon is run locally on each machine and
provides to the printer spooler daemon a named pipe to print on. This way
lpd thinks, it'll print directly to the printer. The daemon instead redirects
every input to the network printer. This is achieved by opening a TCP/IP
connection on port 9100 of the HP Laserjet 4.
Writing a deamon is a somewhat unpleasent work. I first had to read a lot of books and other people's sources. Then I developed my own C++ class encapsulating all the things common to all daemons. That is: preventing the user from invoking the daemon twice, etc. As you can imagine, daemons are most of the time much unpleasent fellas... The class package is called Aladin but I want to state clearly that the package has been developed long before Walt Disney's Aladdin appeared on the scene. Also note that I use the German spelling of the name Aladin with just one "d". Currently there's no documentation available. Unfortunatly I can't provide any extensive help with the daemon class. But by reading the source you should easy figure out how to use the new class. Just as the final tip: always treat daemons with extreme care - or some day you'll find yourself sitting in a lamp or a bottle or even a microprocessor!
![]() ![]() Contents: Harald Albrecht (albrecht@igpm.rwth-aachen.de) Layout: Harald Albrecht Last Change: 97/08/10 (ab) |