When I send UDP packets using this script, the destination UDP port number stays fixed to the one passed in the argument but source UDP port number seems to be incrementing by 1 every time I call judp. Is there a way to have a fix source UDP port number as well?
Thanks in advance.
@Adam: actionStr is an input argument that can be either the string 'send' or the string 'receive'. Have you tried following the examples that are displayed when you type 'help judp'? They should work pretty much as-is, except that when you use 'send', you will have to supply the actual IP address of your target, and in both the 'send' and 'receive' cases, you will need to supply an integer port number between 1025 and 65535. Note that the specified port must be open in the receiving machine's firewall.
AMAZING! This code was exactly what I needed for quickly sending small packets between two computers, both sending and receiving. Using test code in a small loop I was able to gt loops that took on average around 10 ms. I couldn't believe it, since the computers I was testing this with were relatively slow.
(p.s. i want to give give code 5 stars, but the website's java isn't working so it won't let me submit my rating.)