Method: Msf::Exploit::Remote::Udp#disconnect_udp

Defined in:
lib/msf/core/exploit/remote/udp.rb

#disconnect_udp(nsock = self.udp_sock) ⇒ Object

Closes the UDP socket



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/msf/core/exploit/remote/udp.rb', line 63

def disconnect_udp(nsock = self.udp_sock)
  begin
    if (nsock)
      nsock.shutdown
      nsock.close
    end
  rescue IOError
  end

  if (nsock == udp_sock)
    self.udp_sock = nil
  end

  # Remove this socket from the list of sockets created by this exploit
  remove_socket(nsock)
end