SRMP sender

Posted on 2006-06-08
Last Modified: 2010-04-15
Hi Experts,

I am writing SRMP sender program, and I dont know how to send SRMP_DATA, because I should send a packet , and then check if I receive ack for that packet, if not I will send the next packet, But I should keep track of each packet time_out, if for example,
I send packet1
t1=I get the current time
I check if I receive any thing
t2=I check the time
if (t2-t1)<2 seconds
I send packet2
and I should check again for timeout
I dont know exactly in which matter I should keep track of each packet and the timeout for each packet

this are some links of some websites how have done this before:

Question by:zahmadian
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 24

Accepted Solution

fridom earned 500 total points
ID: 16867768
sorry, that makes no sense to me. You wrote:
"because I should send a packet , and then check if I receive ack for that packet, if not I will send the next packet"

If you do not have received the ack then this package is lost and you are going to send the next package? I would expect you retransmit that "lost" package.

Now as I understand is that you like to have a "reliable" protocol upon UDP. So the task you have to carry out are for me.
- keeping book about the send package, there transmittion time and there status
- dependen on the status you either "resend" packages or send the next package
- if you get an request that one package is missing you retransmit it.  

on the other side the following happens. The packages come in in an arbitrary order for that you keep a counter for the number of the package. You cashe the received packages till you get them all then you put them back into the right order.

If you see that package is missing after a certain time, you ask the sender to retransmit the package.

So you task is as I understand implementing this book-keeping. So go for it....


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Inorder binary search tree 5 179
UPD maximums on Red Hat 6 125
xamarin c# deserialize Json containing nested object 2 149
Computer slow / BSOD 10 70
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question