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

    Join Date
    Aug 2003
    Posts
    2
    Rep Power
    0

    Socket Programming in C


    Hello Folks,

    I am challanged with an interesting problem. The description is given below:

    On a linux box, I have to collect physical data on serial (RS232) port and send it to localhost (127.0.0.1) port. Once there, I have to recollect and translate this data to a usable format.

    The problem is I am a novice in Socket programming. Can some shed some light (any thoughts are valuable) and give me a little guidence to accomplish this mission.

    TIA

    Boomeral
  2. #2
  3. I'm Baaaaaaack!
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jul 2003
    Location
    Maryland
    Posts
    5,538
    Rep Power
    244
    You should be able to find example code in C for just about any Linux implementation you care to google for, just try different keywords.

    BTW: Why not just process the data directly from the serial port? Why send it to a socket on the localhost?

    My blog, The Fount of Useless Information http://sol-biotech.com/wordpress/
    Free code: http://sol-biotech.com/code/.
    Secure Programming: http://sol-biotech.com/code/SecProgFAQ.html.
    Performance Programming: http://sol-biotech.com/code/PerformanceProgramming.html.
    LinkedIn Profile: http://www.linkedin.com/in/keithoxenrider

    It is not that old programmers are any smarter or code better, it is just that they have made the same stupid mistake so many times that it is second nature to fix it.
    --Me, I just made it up

    The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
    --George Bernard Shaw

IMN logo majestic logo threadwatch logo seochat tools logo