Re: NSNetService - send data to printer
Re: NSNetService - send data to printer
- Subject: Re: NSNetService - send data to printer
- From: Jens Alfke <email@hidden>
- Date: Mon, 31 May 2010 13:19:37 -0700
On May 31, 2010, at 6:50 AM, Philip Vallone wrote:
> Where can I find additional information on using NSNetService and sending data to a printer? I am able to find a printer using NSNetService, but unable to figure out how to send data.
Bonjour is only about service discovery. It just tells you a service’s IP address; it doesn’t have anything to do with the connection or protocol.
> Should I use NSStream, NSSocketPort etc...? I am a bit confused.
NSNetService does have a convenience method -[getInputStream:outputStream:] that will open a socket to the service’s IP address/port; so NSStream is probably the easiest API to use.
At that point you’ll need to use whatever data protocol the printer supports. That’s off-topic for this list, and not something I know about; you’ll need to do some research to find out about printing protocols.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden