|
From: | Stephen Woolerton |
Subject: | Re: GNUstep on FreeBSD 10 |
Date: | Mon, 26 Aug 2013 23:17:14 +1200 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 |
On 26/08/13 8:43 PM, David Chisnall wrote:
I'd be interested to see such methods. I did hunt around for implementation of networking methods in GNUstepBase however I could only find method stubs - no implementation. Then I found ETSocket in EToile, and extracted that class and got it working in gnustep-base sans SSL. I was doing this for a Raspberry Pi install, where there is GNUstep, but no libdispatch.On 26 Aug 2013, at 09:29, Stephen Woolerton <sdw@shineonline.co.nz> wrote:I put some sample code up at http://artinamessage.wordpress.com/2013/08/26/sockets-libdispatch-and-gnustep/ A simple networked client and server using GNUstep and libdispatch on FreeBSD.You could probably simplify the code a lot by using NSFileHandle to set up the socket and then just get the fd that it returns. GNUstep has some helper methods in GNUstepBase that make this easier. David
While we're on the subject, I found Apple advising not to use NSFileHandle for sockets... https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/CommonPitfalls/CommonPitfalls.html and the section titled "Do Not Use NSSocketPort (OS X) or NSFileHandle for General Socket Communication". However, so far as GNUstep and ETSocket are concerned, it seems to me that NSFileHandle is connected to standard POSIX sockets and so there should be no issue.
Regards Stephen
[Prev in Thread] | Current Thread | [Next in Thread] |