Thread: Send Log

  1. #1
    Registered User
    Join Date
    Sep 2003

    Send Log

    Can ne1 help me on that?I will make a connection on a port to a server defined in the c:\gateway2.ini file. It will send the first line as cluster-agent defined in the ini file.
    It will then check to see if the logfile exists. If it does exist it will check to see if an offset file exists. If it does it will read from the file from the offset and send the information to the server. It will then update the offset file with the new postion that has been read to in the file. It then searches thru the text read from the file to see if it contains the string "EXECUTE:" if it sees this string it will take the next chars up to the end of the line and execute them as an external command.
    If it sees the string "OUTPUTFILE DONE" it will remove the file defined in the ini as outputfile.
    The program then waits until the logfile contains more data appended to it. As soon as it does it will act as above sending just the new information from the offset.


  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Each one of these tasks alone is fairly simple. However, without an idea of your specific problem, you'll pretty much be ignored around here. We don't have time to do all of your work for you, and since you didn't tell us anything more than the program's requirements, we have no choice but to assume that's what you want.
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Oct 2002
    Show us what you've done so far and what your having a problem with.

    All About: File I/O in C++ might be of help.

    Johnnie's Winsock Tutorial is another article that might give you some ideas.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. tuncated uint8_t
    By Coens in forum C Programming
    Replies: 14
    Last Post: 11-24-2008, 07:57 AM
  2. searching problem
    By DaMenge in forum C Programming
    Replies: 9
    Last Post: 09-12-2005, 01:04 AM
  3. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM
  4. LISP (DrScheme) any one?
    By Jeremy G in forum A Brief History of
    Replies: 5
    Last Post: 03-31-2004, 12:52 PM
  5. My log file player; Hit the brick wall
    By Twig in forum C Programming
    Replies: 6
    Last Post: 07-27-2002, 05:35 PM