1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Rep Power

    Send and receive data stream

    Hi to all,
    I'm a newbie. I'm having a text file in my machine. I want to read the data stream from notepad(.txt) and send to the server as a stream. I've searched the google i cant get the program in C. Could you guys help me? Below is the data in text file.

    0110 0 A 7901618382 1213456789 22/11/2013 11:41 000000
    0110 0 A 7901618382 1213456789 22/11/2013 11:42 000000
    0110 0 A 7901618382 1213456789 22/11/2013 11:45 000000

  2. #2
  3. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Rep Power
    I have absolutely no idea what capabilities that notepad could bring to bear on this problem. Does it have DDE hooks that you know of and need or want to use?

    If instead notepad doesn't need to get involved and you just want to send a text file over the network, then use sockets. With a TCP socket, connect to the server, open the text file, then read it a line at a time and send each line to the server.

    Do you know an established application-level protocol that you want to use?

    Would FTP or TFTP be an option? If so, then you could use existing programs. Also, what OS will you be doing this in?
    Last edited by dwise1_aol; November 28th, 2013 at 01:08 AM.

IMN logo majestic logo threadwatch logo seochat tools logo