Hi all,
I have a simple Windows programming question: Is the standard Berkeley socket API available in Windows, and does it work exactly as in Unix? Is there anything in particular to be aware of when writing portable TCP server software, or can I just go ahead and write standard Unix code, and expect everything to work without changes under Windows?
Tord
Sockets under Windows
Moderator: Ras
-
Tord Romstad
- Posts: 1808
- Joined: Wed Mar 08, 2006 9:19 pm
- Location: Oslo, Norway
-
Arash
Re: Sockets under Windows
Hi,
In Windows world, equivalent of Berkeley socket API is Winsock API, But not exactly. Winsock is modeled after Berkeley socket API, but some changes are necessary.
Please see the following links:
1-Client:
http://msdn.microsoft.com/en-us/library ... S.85).aspx
2-Server:
http://msdn.microsoft.com/en-us/library ... S.85).aspx
Arash
In Windows world, equivalent of Berkeley socket API is Winsock API, But not exactly. Winsock is modeled after Berkeley socket API, but some changes are necessary.
Please see the following links:
1-Client:
http://msdn.microsoft.com/en-us/library ... S.85).aspx
2-Server:
http://msdn.microsoft.com/en-us/library ... S.85).aspx
Arash
-
Tord Romstad
- Posts: 1808
- Joined: Wed Mar 08, 2006 9:19 pm
- Location: Oslo, Norway
Re: Sockets under Windows
Thanks, Arash! 
That looks a little more different than I had hoped, but not at all unmanagable.
Tord
That looks a little more different than I had hoped, but not at all unmanagable.
Tord
-
ilari
- Posts: 750
- Joined: Mon Mar 27, 2006 7:45 pm
- Location: Finland
Re: Sockets under Windows
Maybe you should consider using some cross-platform abstraction library. Boost for example, if you're using C++: http://www.boost.org/doc/libs/1_38_0/do ... _asio.html
-
rreagan
- Posts: 102
- Joined: Sun Sep 09, 2007 6:32 am
Re: Sockets under Windows
It's pretty standard "Microsoft brain damange" (as Tim Mann correctly put it)Tord Romstad wrote:Thanks, Arash!
That looks a little more different than I had hoped, but not at all unmanagable.
Tord