• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: recvmsg() in Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recvmsg() in Tiger


  • Subject: Re: recvmsg() in Tiger
  • From: Chaz McGarvey <email@hidden>
  • Date: Thu, 12 May 2005 17:05:31 -0600


On May 12, 2005, at 4:47 PM, Gerriet M. Denkmann wrote:

I have some code which works just fine on Panther:

int comms[2];
pipe(comms);

struct msghdr         msg ;
... fill msg
ssize_t bytesRead = recvmsg( comms[0], &msg, 0 );

In Panther the program now waits until some data arrives on the pipe.

But Tiger immediately tells me: "Socket operation on a non-socket".
And, when I look at my code, this makes sense: a pipe probably is not a socket (not that I know the difference).


So two questions:
Why did this work on Panther?
And (much more important): what do I have to do to make it work on Tiger?



A pipe and a socket are the same thing in that they are both file descriptors (I think), but there are some differences. I don't know why it worked on Panther and not Tiger, but recvmsg() is typically only used with sockets and not any other type of file descriptor. You should probably be using read().


chaz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >recvmsg() in Tiger (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: programming window with textView
  • Next by Date: Re: recvmsg() in Tiger
  • Previous by thread: recvmsg() in Tiger
  • Next by thread: Re: recvmsg() in Tiger
  • Index(es):
    • Date
    • Thread