gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"Modern" server socket programming?


From: Marcus Müller
Subject: "Modern" server socket programming?
Date: Tue, 8 Jan 2013 17:55:47 +0100

Hi all,

I've just started to port a rather tiny Bonjour-service based server application from OSX to GNUstep (running on FreeBSD 9.1). Because this is a new-school ObjC 2.0 ARC based project, I've also installed all prerequisites for doing that: brand new clang, libobjc2. Everything works as expected (even the Bonjour code), life is good.


PROBLEM
=========

I've then extended the code to provide a Bonjour service. Because it's very convenient to do so on OSX, I've made use of ULINetSocket (uliwitness/ULINetSocket · GitHub). ULINetSocket itself is a very convenient wrapper around CFSocket… and that's where the trouble kicks in. It appears the CFSocket runloop scheduling code hasn't been done, yet, which makes it rather pointless to use GNUstep corebase in conjunction with ULINetSocket right now (* see below).

I've then started to look into alternatives (including my own ObjC socket code which dates back ~ 10 years), but all of them seem to use background threads (or have issues with IPv6) which seems quite out of date in 2013.


SOLUTION?
==========

Searching for alternatives I've stumbled across GSSocketServerStream (GSInetServerStream, …) which seems to be something that I could use, but haven't found any code demonstrating how to use it. Does anybody have any demo code/project as a starting point?

Are there any other modern socket libraries (focus on server socket) that you can recommend? Ideally, something which works on OSX and GNUstep out of the box?


Cheers,

  Marcus


P.S.: (*) I'm aware that I could also go ahead and implement the missing CFSocket runloop scheduling code. While that's probably interesting to do and GNUstep's GSRunLoop already provides most (all?) the required infrastructure for that, the problem that GNUstep corebase isn't ARC compatible would prevent me from using it in my project anyways (and rewriting everything to non-ARC is out of question for me).

-- 
Marcus Müller  .  .  .  http://www.mulle-kybernetik.com/znek/



Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]