Jump to content

  • Log In with Google      Sign In   
  • Create Account

Choosing a network library


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Jeffreyp   Members   -  Reputation: 178

Like
0Likes
Like

Posted 06 June 2012 - 10:26 AM

Hello,

I wan't to learn networking but i can't decide which library i should use. I'm on windows(7) and it doesn't need to be
cross-platform. Also i want it to be low-level(as this is for learning purpose) but i can't find anything good.
Most people saying that i should avoid Winsock. I did a quick google search and i read on the microsoft website
about another networking api that is called Network Direct. Is this a good network api for game development?
Couldn't find much information about it. Also it seems that it is a sort of replacement for winsock?

I already checked out boost asio but i prefer to avoid it.

Thanks in advance

(I did check out the FAQ)

Edited by Jeffreyp, 06 June 2012 - 10:30 AM.


Sponsor:

#2 Madhed   Crossbones+   -  Reputation: 2957

Like
1Likes
Like

Posted 06 June 2012 - 11:14 AM

I'm not familiar with Network Direct, but from what I have read it seems to be a hardware vendor interface so it's probably way too low level.
Winsock is as low level as you should go.
If others say you should avoid winsock, it's probably because there exist many higher level apis that can do a lot of work for you.

#3 Jeffreyp   Members   -  Reputation: 178

Like
0Likes
Like

Posted 06 June 2012 - 12:58 PM

I'm not familiar with Network Direct, but from what I have read it seems to be a hardware vendor interface so it's probably way too low level.
Winsock is as low level as you should go.
If others say you should avoid winsock, it's probably because there exist many higher level apis that can do a lot of work for you.


Oke so if i would choose Winsock,
It will not be removed(it isn't deprecated) in future versions of windows?(like windows 8?)

#4 wicked357   Members   -  Reputation: 1165

Like
0Likes
Like

Posted 06 June 2012 - 02:12 PM

Have you checked out Raknet they have a hobbiest license that allows you to use it for free as long as you don't sell your app for a certain amount but those specifications are under the licensing tab.

#5 hplus0603   Moderators   -  Reputation: 5303

Like
1Likes
Like

Posted 06 June 2012 - 04:24 PM

Winsock version 2.2 will be around forever. Everything is using it.
There are good and bad parts about WinSock. You don't want to use WSAAsyncSelect() or WSAEventSelect(), for example!
Instead, you should use OVERLAPPED I/O on the socket (sockets are file handles since Windows NT)
You can then use GetQueuedCompletionStatus() and similar functions to do overlapped/asynchronous I/O on the sockets with I/O completion ports. That's the "best" way to do sockets on Windows (but not the easiest.)

If you want a different library, and are OK with C++, I recommend boost::ASIO.

enum Bool { True, False, FileNotFound };

#6 Jeffreyp   Members   -  Reputation: 178

Like
0Likes
Like

Posted 07 June 2012 - 01:59 PM

Oke thanks. I will use winsock because i already got experience with it : )




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS