るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.128秒)

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

ライブラリ

検索結果

BasicSocket#getpeereid -> [Integer, Integer] (21209.0)

Unix ドメインソケットにおいて接続相手の euid と egid を 返します。

...でない場合の返り値は
不定です。

require 'socket'

Socket.unix_server_loop("/tmp/sock") {|s|
begin
euid, egid = s.getpeereid

# Check the connected client is myself or not.
next if euid != Process.uid

# do something about my resource.
e...