Parent

Methods

Included Modules

Kgio::Socket

A generic socket class with Kgio::SocketMethods included. This is returned by all Kgio methods that accept(2) a connected stream socket.

Public Class Methods

click to toggle source
     addr = Socket.pack_sockaddr_in(80, 'example.com')
     Kgio::Socket.connect(addr) -> socket

     addr = Socket.pack_sockaddr_un("/path/to/unix/socket")
     Kgio::Socket.connect(addr) -> socket

Creates a generic Kgio::Socket object and initiates a non-blocking connection.

This may block and call any method defined to kgio_wait_writable for the class.

static VALUE kgio_connect(VALUE klass, VALUE addr)
{
        return stream_connect(klass, addr, 1);
}
click to toggle source
     addr = Socket.pack_sockaddr_in(80, 'example.com')
     Kgio::Socket.start(addr) -> socket

     addr = Socket.pack_sockaddr_un("/path/to/unix/socket")
     Kgio::Socket.start(addr) -> socket

Creates a generic Kgio::Socket object and initiates a non-blocking connection. The caller should select/poll on the socket for writability before attempting to write or optimistically attempt a write and handle :wait_writable or Errno::EAGAIN.

static VALUE kgio_start(VALUE klass, VALUE addr)
{
        return stream_connect(klass, addr, 0);
}

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.