Hi all,

For my project I have to send data from dos computer to a IP address ( i.e 216.152.xx.xxx port 57.
I have no idea how to accomplish this task. PC is connected to internet. I can do this using microsoft windows. But i dont know how to do it using DOS (non windows enviornment)
Also I am using turbo C.

Any idea??

Re: How to Send Data to IP address 80 80

You need to learn little bit of socket programming , check any network book (e.g. stevens )

Re: How to Send Data to IP address 80 80

DOS network programming is not directly supported by TURBO C. If someone assigned this task to you then that person must have some linkable files to supply TCP/IP support.
This stuff is VERY old. TURBO C should be banned from classrooms. IMO.

There were some network support libraries here:

Re: How to Send Data to IP address 80 80

The above links will help you learn about sockets.

What you're looking to do is..

Create a socket (using socket() ).
Setup destination for this socket, and the port you want to make this socket connect to (check the links).

Try connecting to another socket at the destination end (using connect() ).

Send information to this socket (using send() )

The above is based on TCP/IP, so you can create a TCP/IP 3-way handshake, and verify that data has been transferred correctly.
Using UDP would just send the data and we wouldnt know if it has been received or not.

Any questions or elaboration needed.
Just reply.

Re: How to Send Data to IP address 80 80

can i recieve data from any remote ip address

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.