Solved

Sockets in Borland C++

Posted on 2004-08-17
5
371 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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

816 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now