• 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: Re(2): Not able to get success with setsockopt
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re(2): Not able to get success with setsockopt


  • Subject: Re: Re(2): Not able to get success with setsockopt
  • From: "Basavaraj Pujar" <email@hidden>
  • Date: Mon, 20 Feb 2006 12:22:16 +0530

Thank you. It worked by changing it into int type.

Regards,
Raj



On 2/17/06, Peter Lovell <email@hidden> wrote:
> >
> >On Feb 17, 2006, at 05:02 , innovator information wrote:
> >
> >> Hello,
> >>
> >> I am not able to pass through setsockopt in Mac OS Tiger.
> >>
> >> setsockopt( socketFd, SOL_SOCKET, SO_BROADCAST, &cOptVal, sizeof(char)
> >> where cOptVal is 1.
> >>
> >> It is always returning < 0.
> >> what is wrong with this.
> >
> >A return value of "-1" from a system call is usually accompanied by
> >an explanation in the global "errno" (see the man page for setsockopt
> >()).  That will tell you what is wrong.
>
>
> ... and the first thing I'd check is the size of the variable to pass.
>
> I suspect that you might have more luck defining it as an "int" and
> saying it's four bytes.
>
> This has always been a source of much confusion, at least for me.
>
> Cheers.....Peter
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Macnetworkprog mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Re(2): Not able to get success with setsockopt
      • From: Jim Luther <email@hidden>
References: 
 >Not able to get success with setsockopt (From: innovator information <email@hidden>)
 >Re: Not able to get success with setsockopt (From: "Justin C. Walker" <email@hidden>)
 >Re(2): Not able to get success with setsockopt (From: "Peter Lovell" <email@hidden>)

  • Prev by Date: XML SOAP Request with CFWebServices
  • Next by Date: How to broadcast a message in Mac OS X
  • Previous by thread: Re(2): Not able to get success with setsockopt
  • Next by thread: Re: Re(2): Not able to get success with setsockopt
  • Index(es):
    • Date
    • Thread