Re: portable socket wrappers



On Wed, Jul 04, 2007 at 03:52:43PM +0200, katsanqat wrote:
> I am using the BSD sockets with GTK+ on Windows and Linux since a few
> years and it works great, code does exactly what I want and I like to
> have control over everything.

Does strerror on Win32 support WinSock error codes? The last time I
checked, perror didn't.


> Portability is not a problem it's just a question of 2 or 3
> pre-processor directives.

One for WSAStartup, one for WSAShutdown, one for WSAEWOULDBLOCK. For all
others I need a library? I really don't want to #ifdef e.g. all error
codes.


> Using sockets is very simple plus code is short but well some might
> think it is easyer to learn a second API. Think long-term.

What I want in the long term is short, maintainable code. Using ACE, I
have #ifdefs in the lib, and don't have to deal with every possible name
resolution and connect issue.


With kind regards,
-- 
Baurzhan Ismagulov
http://www.kz-easy.com/



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