[Openmcl-devel] Publishing a service under Mac OS X (10.6.8 or 10.5.8)

Keith Erf clozure at kytek.com
Tue Aug 2 08:51:28 PDT 2011


When running:
CCL 1.7 r14926
CCL 1.6 r14823

The following send statement fails as described.

When running:
CCL 1.5 r13659
The send statement functions as expected (ie publishes the service).

(let* ((port 27856)
        (the-socket (make-socket :type :stream
			:connect :passive
			:local-port port)))

(cond ((not (eql nil the-socket))
	(setf *registration*
		(make-instance 'ns:ns-net-service
		  :init-with-domain #@"local."
		  :type #@"_autopage._tcp."
		  :name #@"Pagination Server"
		  :port port))

	(if *registration*
		(ccl::send *registration* 'publish))))

Under ccl 1.6/1.7 this error occurs:
>  Error: Objective-C runtime exception:
>         *** -[NSNetService publishWithOptions:]: cannot publish an 
>NSNetService created for resolution.

The current documentation for NSNetService Class Reference states 
that initWithDomain:type:name cannot be used for publishing a 
service, one must use initWithDomain:type:name:port which I believe 
I'm doing.

I'm guessing I'm missing something obvious but I wasn't able to 
locate any examples as to how to do this correctly.

-- 
Keith Erf



More information about the Openmcl-devel mailing list