Project

General

Profile

Bug #7968 ยป socketsendtest.rb

Script to test UDPSocket#send - cs96and (Alan Davies), 02/26/2013 08:55 PM

 
require 'socket'

s = UDPSocket.new
s.bind("127.0.0.1", 12345)
s.connect("127.0.0.1", 23456)

100000.times do
s.send("Hello!", 0)
# Comment in the send() call above and uncomment the print() call below to improve performance.
#s.print("Hello!")
end
    (1-1/1)