C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 28th, 2002, 04:22 AM
royston royston is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 0 royston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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

Reply With Quote
  #2  
Old August 28th, 2002, 11:29 AM
kuphryn kuphryn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 40 kuphryn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 13 sec
Reputation Power: 11
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

Reply With Quote
  #3  
Old August 28th, 2002, 01:52 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Nov 2001
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 9,387 Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level)Scorpions4ever User rank is General 46th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 1 Day 21 h 39 m 3 sec
Reputation Power: 4080
My favourite book on socket programming is UNIX Network Programming by Richard Stevens (http://www.amazon.com/exec/obidos/A...9187047-7867246) Just about every other socket programming book/article I've seen invariably refers to this book for further reading.

Reply With Quote
  #4  
Old August 28th, 2002, 03:15 PM
justice41 justice41 is offline
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Emerald City
Posts: 289 justice41 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
Quote:
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

Reply With Quote
  #5  
Old August 28th, 2002, 11:02 PM
royston royston is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 0 royston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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

Reply With Quote
  #6  
Old August 29th, 2002, 07:16 AM
dcaillouet's Avatar
dcaillouet dcaillouet is offline
Big Endian
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2001
Location: Fly-over country
Posts: 1,172 dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 29 m 5 sec
Reputation Power: 29
...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/se...asp?FileID=2417

Reply With Quote
  #7  
Old August 29th, 2002, 11:54 AM
royston royston is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 0 royston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
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?

Reply With Quote
  #8  
Old August 29th, 2002, 12:47 PM
dcaillouet's Avatar
dcaillouet dcaillouet is offline
Big Endian
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2001
Location: Fly-over country
Posts: 1,172 dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 29 m 5 sec
Reputation Power: 29
Quote:
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Help with socket programming

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap