In Files

  • mrbgems/mruby-socket/mrblib/socket.rb

BasicSocket

Attributes

do_not_reverse_lookup[RW]

Public Class Methods

do_not_reverse_lookup() click to toggle source
 
               # File mrbgems/mruby-socket/mrblib/socket.rb, line 171
def self.do_not_reverse_lookup
  @@do_not_reverse_lookup
end
            
do_not_reverse_lookup=(val) click to toggle source
 
               # File mrbgems/mruby-socket/mrblib/socket.rb, line 175
def self.do_not_reverse_lookup=(val)
  @@do_not_reverse_lookup = val ? true : false
end
            
for_fd(fd) click to toggle source
 
               # File mrbgems/mruby-socket/mrblib/socket.rb, line 185
def self.for_fd(fd)
  super(fd, "r+")
end
            
new(*args) click to toggle source
 
               # File mrbgems/mruby-socket/mrblib/socket.rb, line 179
def initialize(*args)
  super(*args)
  self._is_socket = true
  @do_not_reverse_lookup = @@do_not_reverse_lookup
end
            

Public Instance Methods

local_address() click to toggle source

def connect_address

 
               # File mrbgems/mruby-socket/mrblib/socket.rb, line 191
def local_address
  Addrinfo.new self.getsockname
end
            
recv_nonblock(maxlen, flags=0) click to toggle source
 
               # File mrbgems/mruby-socket/mrblib/socket.rb, line 195
def recv_nonblock(maxlen, flags=0)
  begin
    _setnonblock(true)
    recv(maxlen, flags)
  ensure
    _setnonblock(false)
  end
end
            
remote_address() click to toggle source
 
               # File mrbgems/mruby-socket/mrblib/socket.rb, line 204
def remote_address
  Addrinfo.new self.getpeername
end