Jump to content
  • Advertisement
Sign in to follow this  
Woad

Consoles and Winsock2

This topic is 4439 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

I've just finished reading the long article on using Winsock2 with C++ . I learned some things from it but not enough to go through the Main.cpp and delete all the miscellanious DirectX code and have the bare Winsock2 stuff and be able to use it with a (I think) Win32 Console Application. So how do I use the winsock stuff with the console app? I'm trying to make a MUD (the MUD book didn't make sense to me on how to set up the Winsock stuff, so unless you can explain how to get me started with it don't post a link saying read this). Just a .cpp with a very simple console application input ouput multi-user would help me out a lot as a kind of 'template' to help me learn. Thx

Share this post


Link to post
Share on other sites
Advertisement
Look for a BSD sockets example program. Use that, as Winsock is just a minor variation on the same theme.

Share this post


Link to post
Share on other sites
Thanks guys I'll start researching BSD, and since you said BSD is similar to WinSockets does that mean that it will not work on other operating systems besides Windows 95 and above as well?

Share this post


Link to post
Share on other sites
Thanks I think that's what I was looking for more than BSD. I searched up BSD and it's an operating system?

Share this post


Link to post
Share on other sites
Again with this problem =( There's always the step you have to do so everything works under project settings and something else. But I can't find where that is. Not even my dad could find it and he works for Microsoft doing stuff with Visual Studios. So where is it? A hotkey to use it or anything?

Share this post


Link to post
Share on other sites
Quote:
There's always the step you have to do so everything works under project settings and something else.


It would be a lot easier to help if you told us what you were actually trying to do...

All you have to do to 'setup' winsock in MSVC++ is this...

#include <winsock2.h>
#pragma comment( lib, "WS2_32.lib" )

Share this post


Link to post
Share on other sites
Thanks Deyja that helps out, and btw I did say what I was trying to do:

"I'm trying to make a MUD" was in my first post. Which means I'm trying to make a multiplayer MUD.

Share this post


Link to post
Share on other sites
Quote:
Original post by Woad
Thanks Deyja that helps out, and btw I did say what I was trying to do:

"I'm trying to make a MUD" was in my first post. Which means I'm trying to make a multiplayer MUD.

Granularity. Given that making a MUD involves a ton of things that have nothing to do with networking and/or sockets, clearly that's a useless piece of information in this context. If you want quick and accurate help, you have to learn to give detailed and relevant information. Call it fair exchange, if you will.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!