views:

99

answers:

4

The IM program was just an example, but where would I start to learn how to get input from another computer across the network whether that network is LAN or through the internet?

EDIT:: The languages I'm familiar with are C++ and python. The platform I'm on is vista 64bit

A: 

sockets

They have them for every language and every operating system.

Alex Gartrell
+3  A: 

That depends very much on which language, and probably also which operating system, you'll be programming for. Generally it will involve "sockets" though.

Depending on what exactly you're trying to do there may be some higher-level system that you can use, but any sort of network communication is fundamentally based on sockets.

David Zaslavsky
I added to my OP -- C++ and Python along with on vista 64-bit
Justen
+1  A: 

I'd probably suggest learning from the source code of an existing program. As far as chat oriented network programs go, you cant get much simpler than Internet Relay Chat. For instance ircII is an open source text mode irc client for unix like systems.

TokenMacGuy
+3  A: 

There are 2 types of network programming, Synchronys and Async. Sync programming is easier but less effecient, Async is harder but much more efficient.

In order to learn both models easily, it is better to start in a language that has good library support for these 2 models, C# and Java are great examples since they contain really cool high level frameworks to work with Sockets and threads.

You can also check out the async programming model offered by CCR ( concurrency and coordination runtime ), which is really useful and make async programming really easy.

Hope this help.

mfawzymkh
If your language is C++, then I recommend you take a look at QT library from Trolltech, it has a great framework to work with sockets and will make network programming really easy for you.
mfawzymkh