UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

  • Index
  • » C
  • » need help urgently with programming in C

#1 2008-11-27 04:21 AM

sush26283
Member
Registered: 2008-11-27
Posts: 2

Re: need help urgently with programming in C

hi there..
i have an assignment in C, and being from hardcore electronics background, i have literally no knowledge of languages..i was wondering if any one could help me out.
the assignments specification stats that I have to establish communication over UDP using stop and wait protocol between the client and server.in case of a time out the sender retransmits the packet and waits for the acknowledgment, also, the receiver should be able to discard the duplicate package..
can someone plz help me out with this. i know its not a difficult programming but the problem is tht i cant learn a new language in a week and do the assignment.
plz someone help me, i would be really grateful, as this assignment can ruin my grades and turn an 'A' into a 'B'....

Offline

#2 2008-11-27 07:27 AM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: need help urgently with programming in C

I find it hard to believe that they gave you only one week for this assignment,
forcing you to use C while you've no experience with it. That would be plain
stupid. Or is this assignment part of a C course you're following? In that case
you should have learned enough C programming by now to be able to make it.
If you get good grades in general you should be able to do this without much
problem, it's not that hard.

One week should be enough to learn a new language well enough to use it,
if you know another, somewhat similar language. What programming
languages do you know?

Once you're somewhat comfortable with C the assignment itself shouldnt take
more than one day. You basically just need to read up on socket programming,
mainly for UDP, and read some manpages. See the manpages of udp(7),
socket(2), recvfrom(2) and sendto(2).

With stop and wait they mean that you just need to ping pong packets
around, just sending explicit acks after each message received. If receiving
an ack takes too long the sender might resend the packet, assuming it
was lost, while it actually did make it. That's why you need to detect and
ignore duplicate packets. Sending along a sequence counter with each
packet and ignoring packets with a sequence counter lower than the last
received one solves this.

Offline

#3 2008-11-27 07:31 PM

sush26283
Member
Registered: 2008-11-27
Posts: 2

Re: need help urgently with programming in C

well the project is for course called computer netwrorks, and so far there has been no class that has dealt wth C...as per my knowledge of languages is concerned its almost null as i have never done programming...and i know tht 1 week is not enough thts why am in a panicked state and am desperately seeking some help...if u have knowledge then can plz u help me out..

Offline

#4 2008-11-28 03:49 AM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: need help urgently with programming in C

Offline

  • Index
  • » C
  • » need help urgently with programming in C

Board footer

Powered by FluxBB