lib/ronin/network/tcp/tcp.rb in ronin-support-0.5.0 vs lib/ronin/network/tcp/tcp.rb in ronin-support-0.5.1
- old
+ new
@@ -46,9 +46,17 @@
#
# @return [Boolean, nil]
# Specifies whether the remote TCP port is open.
# If the connection was not accepted, `nil` will be returned.
#
+ # @example
+ # tcp_open?('example.com',80)
+ # # => true
+ #
+ # @example Using a timeout:
+ # tcp_open?('example.com',1111,nil,nil,5)
+ # # => nil
+ #
# @api public
#
# @since 0.5.0
#
def tcp_open?(host,port,local_host=nil,local_port=nil,timeout=nil)