CUPSD listens to Port: 631

Michael Sweet mike at easysw.com
Wed Jul 7 05:03:40 PDT 2004


PieterJan wrote:
> Can anyone clarify this to me:
> 
> Since Cupsd (The Cups print server) is a deamon application listening
> to incomming jobs on port:631; Would it be possible to have another
> application listen in on that port as wel ??? Or is it not possible
> for 2 apps to listen to the same port?

Nope, that is not possible - only one application can be bound on
a specific port and address.  You can bind to different addresses,
for example, the current CUPS only binds to IPv4 addresses, so you
could use the IPv6 loopback address, however I wouldn't depend on
that working forever or on all systems since users can reconfigure
their CUPS servers...

Also, listening on priviledged ports requires administrative (read:
superuser/root) access, so a normal application cannot listen on a
port less than 1024.

> Additionally, anyone know how I would do that in
> Objective-c/Cocoa/Carbon/Xcode?

I think NSNetwork will do it for you in Objective C land, as will
the BSD socket() and listen() calls.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Printing Software for UNIX                       http://www.easysw.com




More information about the cups-devel mailing list