| | |
How to Send Data to IP address
![]() |
•
•
Join Date: Jul 2007
Posts: 5
Reputation:
Solved Threads: 0
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??
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??
You need to learn little bit of socket programming , check any network book (e.g. stevens )
•
•
Join Date: May 2004
Posts: 177
Reputation:
Solved Threads: 10
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:
http://alumnus.caltech.edu/~dank/trumpet/
This stuff is VERY old. TURBO C should be banned from classrooms. IMO.
There were some network support libraries here:
http://alumnus.caltech.edu/~dank/trumpet/
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.
Cheers.
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.
Cheers.
Last edited by dr4g; Jul 16th, 2007 at 5:05 am.
GardCMS :: Open Source CMS :: Gardcms.org
![]() |
Similar Threads
- Send data on a serial port (C++)
- How can i collect and send data from SERIAL and Ethernet port to V.B.? (Visual Basic 4 / 5 / 6)
- My form can't send data to specific email (ASP)
- send data with modem (Java)
- I need help on send data with modem please (Java)
Other Threads in the C Forum
- Previous Thread: abt priject
- Next Thread: variable arguments in C
| Thread Tools | Search this Thread |
* adobe ansi api array asterisks binarysearch calculate centimeter changingto char character cm convert copyimagefile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax database directory feet fflush fgets file fork forloop frequency givemetehcodez grade graphics gtkgcurlcompiling gtkwinlinux hacking highest histogram homework i/o inches infiniteloop input intmain() iso kernel keyboard km linked linkedlist linux linuxsegmentationfault list locate looping loopinsideloop. lowest match microsoft mqqueue mysql number oddnumber odf open opendocumentformat owf pattern pdf performance posix probleminc process program programming radix recv recvblocked repetition research reversing scanf scheduling segmentationfault send sequential socket socketprograming stack standard string systemcall threads turboc unix user variable voidmain() wab whythiscodecausesegmentationfault windows.h windowsapi






