hello,

if there is no peer for this udp socket which
was created with

  $sock = UDPSocket.new

the script crash with the message
'connection was closed by peer'.

How to avoid this crash?

def Send str
  begin
   $sock.send(str, 0, "127.0.0.1", 9999) # *** crash if no peer...
  rescue Exception
   p "Oops" # was never called
  end

  $trace.insert(0.0, sprintf("=> %s", str))
end


mark