olivarra1 Posted September 3, 2009 Share Posted September 3, 2009 i've googled a lot trying to find how to make a c or c++ TCP/IP server in Windows, but i found nothing. Then thinking and thinking i remembered that Autoit has functions to make TCP connections, and i thought asking here maybe somebody will know. Now the question: is there any way to make a c++/c TCP server for windows? thank you very much, Olivarra1 Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 3, 2009 Share Posted September 3, 2009 Yes. Look up sockets. http://msdn.microsoft.com/en-us/library/ms740673%28VS.85%29.aspx Here's a page to get you started. Link to comment Share on other sites More sharing options...
olivarra1 Posted September 4, 2009 Author Share Posted September 4, 2009 Yeah, i saw that too, but idk how to get it... maybe i need Visual C++? i used to use DevC++ & so olivarra1 Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 4, 2009 Share Posted September 4, 2009 It doesn't mater what editor you use. You just need the appropriate header files. If you plan on writing Windows applications, you'll need the Windows SDK. http://msdn.microsoft.com/en-us/windows/bb980924.aspx This is a set of headers, libraries, and compiler tools for building Windows applications. If you don't even know this much, you have more to learn about coding in C++ before you try building anything. Link to comment Share on other sites More sharing options...
monoceres Posted September 4, 2009 Share Posted September 4, 2009 Or he could just download Visual Studio 2008 Express which ships with the platform sdk (or windows sdk, whatever they call it). Visual Studio is also superior to Dev-Cpp in every possible way. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
jvanegmond Posted September 4, 2009 Share Posted September 4, 2009 Well, Dev-Cpp loads slightly faster on my machine.. : ) Probably because I have so many plugins for VS2008 though. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Richard Robertson Posted September 4, 2009 Share Posted September 4, 2009 I've got a number of programs that load faster than Visual Studio, but most aren't as feature rich. Link to comment Share on other sites More sharing options...
olivarra1 Posted September 5, 2009 Author Share Posted September 5, 2009 (edited) Oh well, i just have 1 year programming in c++, i learned in university, using linux for making console applications. I've never done a windowed app., but i don't want to do that. just i want to do a console-like app. (that you run it with cmd). what i mean: #include <iostream> #include <string> using namespace std; int main(){ cout << "hello, how're u?" << endl; string response; cin >> response; return 0; } Then including If's, For's, While's, some classes, etc.. and what i want to do it's just a game server, the game is made with Flex + Flash. Right now i've made the server in PHP, but i wonder if in C++ would be faster and use less memory. olivarra1 edit: ohh btw, i've found how to include the sockets library. now i just need to see how does it works (functions that it has, etc.) Edited September 5, 2009 by olivarra1 Link to comment Share on other sites More sharing options...
Nutster Posted September 5, 2009 Share Posted September 5, 2009 Yeah, you want to look at network sockets. In particular you want to create a network listener. A quick search turned up this site which talks about setting up a listener in Linux. The Windows implementation is based on the Unix implementation, so most of this should work or at least give you ideas about what you need to do. Also, this site gives a pretty good explanation of what happens during client-server operations and gives some coding tips. David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd... Link to comment Share on other sites More sharing options...
Quafboy Posted October 28, 2009 Share Posted October 28, 2009 Download the source code for netcat. This should be a good reference for rolling your own prog. But don't directly steal code because A. it's wrong and b. antivirus will flag it for similarities to netcat. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now