Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Fratt

just wanna know

This topic is 6020 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello, first, is there any same protocol for windows and linux ? i''ve seen that winsock.h is fairly the same as socket.h for linux. so you agree with that ? second, how do you do that ? do you use thread for posting your socket sending and receiving ? thanx a lot Fratt

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by Fratt
is there any same protocol for windows and linux ?
i''ve seen that winsock.h is fairly the same as socket.h for linux.

so you agree with that ?


Yes. Berkeley sockets will work in almost the same way on both Linux and Windows. There are a few minor differences (e.g. close() versus closesocket()), but overall, you can write reasonably portable code with sockets.
quote:

how do you do that ? do you use thread for posting your socket sending and receiving ?


You can use threads if you want. You can also use non-blocking or asynchronous sockets.

I would recommend having a look at this site, as it has a fair bit of detailed information on socket programming.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!