I’m doing some lovely socket programming in objective-C right now and part of my code is giving me an error (in the setsockopt method call). I was wondering if anyone knows of a similar function to the GetLastError() function in C++ that I could use in objective-C to determine the problem with my code?
Share
You want to look at the value of
errnoif thesetsockoptreturns a negative value.From
setsockoptmanpage:You can see some standard
errnovalues here.