Module: LightIO::Module::Socket::ClassMethods
- Extended by:
- Wrap::Wrapper::HelperMethods
- Includes:
- Base::Helper
- Included in:
- Library::Socket
- Defined in:
- lib/lightio/module/socket.rb
Instance Method Summary collapse
-
#getaddrinfo ⇒ Object
implement ::Socket class methods.
- #getifaddrs ⇒ Object
- #ip_sockets_port0(ai_list, reuseaddr) ⇒ Object
- #socketpair(domain, type, protocol) ⇒ Object (also: #pair)
- #unix_server_socket(path) ⇒ Object
Instance Method Details
#getaddrinfo ⇒ Object
implement ::Socket class methods
62 63 |
# File 'lib/lightio/module/socket.rb', line 62 wrap_methods_run_in_threads_pool :getaddrinfo, :gethostbyaddr, :gethostbyname, :gethostname, :getnameinfo, :getservbyname |
#getifaddrs ⇒ Object
65 66 67 |
# File 'lib/lightio/module/socket.rb', line 65 def getifaddrs origin_getifaddrs.map {|ifaddr| LightIO::Library::Socket::Ifaddr._wrap(ifaddr)} end |
#ip_sockets_port0(ai_list, reuseaddr) ⇒ Object
83 84 85 |
# File 'lib/lightio/module/socket.rb', line 83 def ip_sockets_port0(ai_list, reuseaddr) origin_ip_sockets_port0(ai_list, reuseaddr).map {|s| wrap_to_library(s)} end |
#socketpair(domain, type, protocol) ⇒ Object Also known as: pair
69 70 71 |
# File 'lib/lightio/module/socket.rb', line 69 def socketpair(domain, type, protocol) origin_socketpair(domain, type, protocol).map {|s| wrap_to_library(s)} end |
#unix_server_socket(path) ⇒ Object
75 76 77 78 79 80 81 |
# File 'lib/lightio/module/socket.rb', line 75 def unix_server_socket(path) if block_given? origin_unix_server_socket(path) {|s| yield wrap_to_library(s)} else wrap_to_library(origin_unix_server_socket(path)) end end |