views:

76

answers:

2
+2  Q: 

c udp chat testing

I am writing a udp chat application in c. I need to test if messages are received in an incorrect order. CAn anyone please tell me of a tool I can use to delay certain messages? also please tell me how to use it? thank you very much in advance! also I am using ubuntu x86_64 and OSX 10.6.4. A tool in either OS will work

+1  A: 

If you need to verify this, you probably also don't want messages to disappear (or at least know if they do). UDP doesn't sound like what you want. Have a look at implementing this using TCP instead, you get this behaviour with the protocol.

Also, your accept rate is horribly low, consider accepting some of your past answers; it will make your future questions more pleasant to answer.

jer
thank you for your input I know that TCP would solve all of my problems however my homework assignment is to write it with UDP
romejoe
Tag this as homework then.
jer
@jer: regarding his accept rate. 10 total questions of which 3 don't even have a single answer. doesn't look too terrible imo
Daniel
+2  A: 

When I created a syslog server I needed to see if it was catching the messages. I used Wireshark from http://www.wireshark.org/ . This is a free tool that shows you all traffic passing your network cable. Even packages not intended for your computer.

Have fun...

Max Kielland
I have used wireshark before however as far as I know it can't intercept and delay certain packets
romejoe
Then I'm not sure what you are trying to do. Nothing on the network can be guaranteed to be received in a cretin order. Even TCP/IP is not received in a guaranteed order. Are you on low level or application level?
Max Kielland
application level so far I haven't had messages come out of order so I need to simulate it by holding message n and allowing message n+1 to be received before allowing n to be received
romejoe
Do you know the format of the message? I have written a tool allowing you to, by script, send data over different communication ports, such as UDP or TCP/IP. By the scripting you can create buttons to send messages when ever you want. I'm in the end process of releasing this tool officially. It is free to use and if you are interested I can let you download it somehow.
Max Kielland
My messages consist of only a string that contains all the necessary information. Your tool could be helpful for me if I cut out the client and used your script to send the messages. Is it able to send plain text strings?
romejoe
It can send whatever you like, even stream a file from disk if you want to. This tool is developed for these kind of situations. There are 2 major companies using this tool already for their product development. The easiest way is if you go to my contact page and fill in your email. I will send you info how to download it since it is not official released yet. Go to http://www.mkdevelopment.se/kontakt.php The page is in Swedish (sorry) but the fields are Name, mail, phone (optional), category and message. Is it okay for you if I arrange it tomorrow? It is in the middle of the night here now.
Max Kielland
that would be perfectly fine I can't read swedish (sorry) so would you like me to have anything special under category and message?
romejoe
I have prepared everything for you, just give me your information as mentioned above and I send you the information. No need to add anything there... The program itself is in English =)
Max Kielland
I just send the form THANK YOU FOR ALL YOUR HELP!!
romejoe
You should have the info by now. Only glad to help... Hmm, oups just cam to mind you where not running Windows! Shoot, this only works on Windows XP and up :( Hope you can find something to run it on.
Max Kielland
I have windows I have just been doing all my development in linux. Thank you for everything you are a life saver!
romejoe
Good to hear, just drop a mail if you need help. Do you want me to put you on the notification list for this tool? There will only be notifications sent on new updates.
Max Kielland
yes please put me on the list
romejoe