#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    0
    Rep Power
    0

    Help with socket programming


    Hi...
    wondering if there is anyone out there with experience in socket programming?
    Need some help with a project

    For my project I am supposed to write a client program to send TCP packets out to my lecturer's server that has been pre-programmed to delay, corrupt or lose a certain % of the packets that it receives.
    I am supposed to collect the returned packets and calculate the % of corrupted, delayed, lost packets

    Currently, I have read a few books, articles on socket programming and have learnt how to open or close a socket connection.
    However, i am still at a lost at how to actually do the program (as in how to collect the packets and calulate the %)

    Wondering if anyone can point me to any resources or any advice on what to do or how to start?

    Thx..
    Kelvin
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    40
    Rep Power
    12
    I highly recommend Network Programming for Microsoft Windows, Second Edition by Anthony Jones and Jim Ohmund.

    Post your questions when you need help with something.

    Kuphryn
  4. #3
  5. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,607
    Rep Power
    4247
    My favourite book on socket programming is UNIX Network Programming by Richard Stevens (http://www.amazon.com/exec/obidos/AS...187047-7867246) Just about every other socket programming book/article I've seen invariably refers to this book for further reading.
  6. #4
  7. No Profile Picture
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Location
    The Emerald City
    Posts
    289
    Rep Power
    13
    Originally posted by Scorpions4ever
    My favourite book on socket programming is UNIX Network Programming by Richard Stevens ...
    I have to second Scorpions' nod to this book. I have the first edition and it has been indispensable. It contains just about everything you need to know for network programming.

    jaa
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    0
    Rep Power
    0
    gosh the book is costly! :(

    i am going to try if I can find it in my sch library..cannot afford the book :(

    thx for the tips..

    I will post again if i face any problems
  10. #6
  11. Big Endian
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2001
    Location
    Fly-over country
    Posts
    1,172
    Rep Power
    30
    ...calculate the % of corrupted, delayed, lost packets

    This sounds similar to a popular program called ping. Looking at its source code might help you with your project.

    http://www.programmersheaven.com/sea...sp?FileID=2417
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    0
    Rep Power
    0
    This sounds similar to a popular program called ping. Looking at its source code might help you with your project.
    thx
    I will be taking a look

    Just one question
    does it make a diff whether i write the program in C, perl, Java or PHP?
  14. #8
  15. Big Endian
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2001
    Location
    Fly-over country
    Posts
    1,172
    Rep Power
    30
    does it make a diff whether i write the program in C, perl, Java or PHP?
    To me. No.
    From a technical standpoint. Probably not.
    To your teacher / lecturer. Maybe.
    If your goal is to learn something, do it in all four languages.

    If the person you're doing this for is trying to teach you about low-level socket programming, he might frown if you turn in a project that drops an ActiveX control on a VB form and returns the answer with little or no coding. What I'm trying to say is I don't know how much the other languages like Java wrap socket programming into objects or libraries that shield you from the inner workings of the protocol.

    The language you choose would depend on the reason you're writing the program.

IMN logo majestic logo threadwatch logo seochat tools logo