discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSStream and friends + NSPredicate, NSExpression and others


From: Christopher Armstrong
Subject: Re: NSStream and friends + NSPredicate, NSExpression and others
Date: Thu, 16 Feb 2006 13:59:50 +1100
User-agent: Thunderbird 1.5 (Windows/20051201)

<snip>
I just thought I'd throw my two cents on this one.

Winsock and Unix sockets are similar enough that you can write cross-platform
socket code like this:
<snip>
#define closesocket     close
#define WSAStartup(x,y) 0
#endif
For clarity, it may be better to just ifdef the WSA startup routine separately.
Then use Winsock semantics, namely:
<snip>
7. On Win32 there is no poll() but there is select().  Creating poll() like
functionality involves complicated tricks with WaitForMultipleObjectsEx().
I say complicated here because on WinNT AFAIK you can just pass socket handles
to this function, but 9x needs you to do some extra things which escape me
at the moment.

Just some rough notes from my limited experience porting socket apps to Winsock.


I think gnustep-base forgo compatibility with Windows 9x/Me anyway so the lack of good poll support may not be such a problem, especially considering the NT series of kernels offer much better IMHO pipe/IPC/threading/Unicode semantics than their 9x counterparts, although still complex implementations and not compatible with Unix to any major extent. Thankfully Win32 sockets are based on BSD's implementation. Also, 9x/Me are no longer supported patch-wise by Microsoft, so we shouldn't feel that obliged to support them fully.

Cheers
Chris




reply via email to

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