RSS Forums RSS

How to Send Data to IP address

Please support our C advertiser: Programming Forums
Reply
Posts: 5
Reputation: gemni7 is an unknown quantity at this point 
Solved Threads: 0
gemni7 gemni7 is offline Offline
Newbie Poster

How to Send Data to IP address

  #1  
Jul 9th, 2007
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??
AddThis Social Bookmark Button
Reply With Quote  
Posts: 1,472
Reputation: ithelp has a spectacular aura about ithelp has a spectacular aura about ithelp has a spectacular aura about 
Solved Threads: 99
ithelp's Avatar
ithelp ithelp is offline Offline
Nearly a Posting Virtuoso

Re: How to Send Data to IP address

  #2  
Jul 9th, 2007
You need to learn little bit of socket programming , check any network book (e.g. stevens )
Reply With Quote  
Posts: 177
Reputation: jim mcnamara is on a distinguished road 
Solved Threads: 10
jim mcnamara jim mcnamara is offline Offline
Junior Poster

Re: How to Send Data to IP address

  #3  
Jul 9th, 2007
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/
Reply With Quote  
Posts: 136
Reputation: dr4g is an unknown quantity at this point 
Solved Threads: 5
dr4g's Avatar
dr4g dr4g is offline Offline
Junior Poster

Re: How to Send Data to IP address

  #4  
Jul 16th, 2007
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.
Last edited by dr4g : Jul 16th, 2007 at 4:05 am.
GardCMS :: Open Source CMS :: Gardcms.org
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Views: 5357 | Replies: 3 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:04 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC