るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.249秒)
トップページ > バージョン:2.3.0[x] > 種類:インスタンスメソッド[x] > クエリ:t[x] > クエリ:-[x] > クエリ:a[x] > クエリ:inspect_sockaddr[x]

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. argf.class to_a
  5. dbm to_a

ライブラリ

クラス

検索結果

Addrinfo#inspect_sockaddr -> String (100279.0)

アドレスやポート番号などの情報を人間に読める形の文字列で返します。

アドレスやポート番号などの情報を人間に読める形の文字列で返します。

require 'socket'

Addrinfo.tcp("localhost", 80).inspect_sockaddr #=> "127.0.0.1:80"
Addrinfo.tcp("ip6-localhost", 80).inspect_sockaddr #=> "[::1]:80"
Addrinfo.unix("/tmp/sock").inspect_sockaddr #=> "/tmp/sock"