Solved

Sockets in Borland C++

Posted on 2004-08-17
5
381 Views
Last Modified: 2012-08-14
I would like to know how to use Sockets in Borland C++.
I would like to create a network program that ran on Windows to communicate between two (or more) computers on a network.
I would like to know how to create a server and also how to create a client.
I have done this before, with help of some people and they kinda wrote the whole thing out for me (:D) and I used it and edited it as I pleased.
The other thing is that it has to be ran in MS-DOS. (So you use commands like printf).

Thnx for the help in advance!

Jonny K
0
Comment
Question by:jonnykeogh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 17

Expert Comment

by:rstaveley
ID: 11820465
When you say MS-DOS do you mean MS-DOS or from a Win32 cmd.exe prompt?

If it is genuinely MS-DOS, go here: http://www.dmp.com.tw/tech/dmp-lib/dsock/
0
 
LVL 11

Accepted Solution

by:
Jase-Coder earned 125 total points
ID: 11820491
check out theese tutorials

http://quigley.durrow.com/geek/borland_tcp_main.html
http://www.gametutorials.com/Tutorials/Networking/Networking_Pg1.htm

the last link is a good set of networking tutorials
0
 
LVL 2

Author Comment

by:jonnykeogh
ID: 11825691
I mean MSDOS as in the Win32 command prompt- I'm no good with the win32 dialog stuff!
I'll review the links tommorow, as I'm really tired and need to go to sleep (it's 10:30 here in the UK).

Thnx for help!

Jonny K
0
 
LVL 17

Expert Comment

by:rstaveley
ID: 11828839
> Win32 command prompt

OK, so you need to have a compiler that it able to generate Win32 console applications to be able to use winsock rather than 16-bit DOS applications. What version of Borland C++ are you using?

Beware that the illustrations are gametutorials.com expect you to use Visual C as the compiler, which means that you might have some messing around to do, if you are using Borland. You wouldn't expect the project/workspace/solution files to be compatible.

This might be a better place to start if you are using the free version of Borland C++ 5.5 to generate your Win32 console applications: http://tangentsoft.net/wskfaq/examples/basics/
0
 
LVL 2

Author Comment

by:jonnykeogh
ID: 11834518
Jase-Coder,

I thank you greatly for your help! The www.gametutorials.com website you gave me was VERY handy!
I even learned more than the network stuff! I even saw myself that it said 'VC++', meaning Visial C, but it worked any way. I'm having a great time creating my own programs for networking. Thank you a lot! Here's your points by the way.

Jonny Keogh
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question