• Advertisement

Archived

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

just wanna know

This topic is 5905 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
thank you a lot.

so, i''ll have to use Berckley sockets. let''s go !

Fratt

Share this post


Link to post
Share on other sites

  • Advertisement