Solved

Communication

Posted on 1997-11-18
19
216 Views
Last Modified: 2010-04-10
Please help me write a programme to send and recieve data by C++ through the modem from one computer having c++ to another computer having c++.The prog. encodes the data to be encoded and sends it through a ordinary tel. line and the other computer will have another prog which will decode the data and store it.
0
Comment
Question by:manjit
19 Comments
 
LVL 84

Expert Comment

by:ozo
Comment Utility
#include <stdio.h>
main(){
        int c;      
        while( (c=getchar()) != EOF ){ putchar(c); }
}
0
 

Author Comment

by:manjit
Comment Utility
Edited text of question
0
 

Author Comment

by:manjit
Comment Utility
Adjusted points to 45
0
 

Author Comment

by:manjit
Comment Utility
Adjusted points to 50
0
 

Author Comment

by:manjit
Comment Utility
Edited text of question
0
 

Author Comment

by:manjit
Comment Utility
Edited text of question
0
 
LVL 5

Expert Comment

by:yonat
Comment Utility
Please be more specific. How are the computers connected? Using a TCP/IP network? Using RS232? Something else? What is the OS?
0
 

Author Comment

by:manjit
Comment Utility
Edited text of question
0
 
LVL 5

Expert Comment

by:yonat
Comment Utility
Search for source for zmodem or kermit. For example: http://pauillac.inria.fr/~doligez/zmodem/ and http://www.columbia.edu/kermit/ .
These are protocols for data transfer over modem lines.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:manjit
Comment Utility
Adjusted points to 80
0
 

Expert Comment

by:yingchunli
Comment Utility
For sending data:
  1: using CreateFile("COM1"or "COM2" , .....) to get a handle .
  2: call GetCommState() and SetCommState() to set parameters.
  3: write encodeFunction(text_str, ...) to encode text_str.
  4: call WriteFile( handle, text_str, ......) to send encoded data to the connected serial port.

For receiving data:
   finish the similar steps.
0
 

Author Comment

by:manjit
Comment Utility
Please write the programme for me please.
0
 

Author Comment

by:manjit
Comment Utility
Adjusted points to 170
0
 

Author Comment

by:manjit
Comment Utility
Please write the prog. for me . I need it urgently.Thank You
 
0
 
LVL 5

Expert Comment

by:yonat
Comment Utility
Just use kermit or zmodem - no need to write anything.
0
 

Author Comment

by:manjit
Comment Utility
IT is not the question for transferring files. I have to do a project by writing a prog. in c++ to send and recieve files. I
hope U understand and will please write the prog.
      ThanX A Lot
0
 

Author Comment

by:manjit
Comment Utility
Adjusted points to 205
0
 
LVL 1

Accepted Solution

by:
cchaman earned 300 total points
Comment Utility
Send me your email address... shall mail you a program with
source code.

Keep in mind that the program has a copy-right so use it for
a legal purpore.

AND GET THOSE POINTS READY !!!

0
 

Author Comment

by:manjit
Comment Utility
here's my E-mail
      manjitr@yahoo.com
       ThanX A Lot
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

771 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

10 Experts available now in Live!

Get 1:1 Help Now