Socket Programming for Windows C/C++

前端 未结 7 450
太阳男子
太阳男子 2021-01-26 03:40

I have write a game on OpenGl, and want to make it a multiplayer game. I\'m working on Windows, but I\'m actually a C#-programmer. Socket programming goes too easy at C#, but at

相关标签:
7条回答
  • 2021-01-26 04:00

    You should look into Raknet if you're intrested in Networking for games; or Winsock/BSD sockets if you really want to learn everything under the hood!

    0 讨论(0)
  • 2021-01-26 04:04

    Have a look at the ACE framework. It exists for quite some time.

    0 讨论(0)
  • 2021-01-26 04:08

    The Boost.Asio library is also quite good.

    0 讨论(0)
  • 2021-01-26 04:10

    If you're looking for a simple wrapper to make Socket programming nicely object-oriented, you might check out the sockets wrapper layer I wrote as part of my cross-platform messaging library. It would be pretty straightforward to rip that code out and re-use it. You might even be interested in the rest of the library as well.

    0 讨论(0)
  • 2021-01-26 04:12

    Beej's Guide to Network Programming is recommended in a number of SO replies, for example binding-a-socket-to-port-80-in-ansi-c. Try going over the examples, and maybe you'll find that it's not "too complicated". Windows winsock is highly compatible with the standard socket library. The tutorial contains instructions for programming sockets under Windows.

    0 讨论(0)
  • 2021-01-26 04:16

    You can take a look a the networking sections of the Poco libraries. They aren't going to necessarily be like C# but they are OOP oriented and insulate you as much as possible from the details of network programming. They are also cross-platform is that is an issue.

    [Obligatory note that you should probably expose yourself to said details at some point.]

    0 讨论(0)
提交回复
热议问题