Ruby 1.9.3 リファレンスマニュアル > ライブラリ一覧 > socketライブラリ > Addrinfoクラス > socktype

instance method Addrinfo#socktype

socktype -> Integer

ソケットタイプを整数で返します。

Addrinfo.tcp("localhost", 80).socktype == Socket::SOCK_STREAM #=> true
class Addrinfo