Spinneret UDP Client test
Beau Schwabe
Posts: 6,566
Attached is a UDP Spinneret Client test program, where I'm running a UDP server on this end. I need some 'hits' to do some load testing, so if anyone cares to ping me with the attached Spinneret Client test program, that would be great.
Also there is a version of a Perl Test Script below that will also communicate with the Server if you don't have a Spinneret available.
Thanks.
Perl Test Script
Also there is a version of a Perl Test Script below that will also communicate with the Server if you don't have a Spinneret available.
Thanks.
Perl Test Script
#!/usr/bin/perl -w require 5.003; use IO::Socket; $remote = '24.253.241.231'; $port = 5000; $iaddr = inet_aton($remote) or die "no host: $remote"; $paddr = sockaddr_in($port, $iaddr); $proto = getprotobyname('udp'); socket(Socket_Handle, AF_INET, SOCK_DGRAM, $proto) or die "socket: $!"; $dgram = "Sent from Perl Test Script" ; send(Socket_Handle, $dgram, 0, $paddr); recv(Socket_Handle, $dgram, 1024, 0); print "Server Responded with:\n$dgram\n\n"; exit;
zip
36K
Comments
Thanks!
Don't worry about changing the defaults, those are fine (until I reboot the cable modem)
I did change the 'time' it was way off by 5 hours, and I updated something on this end that should make the pings much faster.
Thanks again ... I'll just let this run for awhile (days) and make sure it doesn't get hung up anywhere.
Pinging from Perl tonight and it's working fine. I'll try pinging from my Spinners tomorrow.
Thanks for the code!
Rick
When my port number has 4 digit it is working fine, but I need 6 digit port 56629
The terminal prompt "Socket NOT Connected" direct after power on
I gees it is in building of the buffer
On "ServerPORT / 256" and "ServerPORT & $FF" I do not understand the function?
Thanks
56629 is 0xDD35h
0xDD35h / 256 = 0xDDh
0xDD35h & 0xFF = 0x35h