Method: Rex::Socket::Udp#write

Defined in:
lib/rex/socket/udp.rb

#write(gram) ⇒ Object Also known as: put

Write the supplied datagram to the connected UDP socket.



51
52
53
54
55
56
57
# File 'lib/rex/socket/udp.rb', line 51

def write(gram)
  begin
    return syswrite(gram)
  rescue  ::Errno::EHOSTUNREACH,::Errno::ENETDOWN,::Errno::ENETUNREACH,::Errno::ENETRESET,::Errno::EHOSTDOWN,::Errno::EACCES,::Errno::EINVAL,::Errno::EADDRNOTAVAIL
    return nil
  end
end