Class: Kgio::UNIXSocket
- Inherits:
-
UNIXSocket
- Object
- UNIXSocket
- Kgio::UNIXSocket
- Includes:
- SocketMethods
- Defined in:
- ext/kgio/connect.c,
ext/kgio/connect.c
Overview
Kgio::UNIXSocket should be used in place of the plain UNIXSocket when kgio_* methods are needed.
Class Method Summary collapse
-
.new(path) ⇒ Object
Kgio::UNIXSocket.new(“/path/to/unix/socket”) -> socket.
-
.start(path) ⇒ Object
Kgio::UNIXSocket.start(“/path/to/unix/socket”) -> socket.
Class Method Details
.new(path) ⇒ Object
Kgio::UNIXSocket.new(“/path/to/unix/socket”) -> socket
Creates a new Kgio::UNIXSocket object and initiates a non-blocking connection.
This may block and call any method defined to kgio_wait_writable
for the class.
274 275 276 277 |
# File 'ext/kgio/connect.c', line 274
static VALUE kgio_unix_connect(VALUE klass, VALUE path)
{
return unix_connect(klass, path, 1);
}
|
.start(path) ⇒ Object
Kgio::UNIXSocket.start(“/path/to/unix/socket”) -> socket
Creates a new Kgio::UNIXSocket 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.
290 291 292 293 |
# File 'ext/kgio/connect.c', line 290
static VALUE kgio_unix_start(VALUE klass, VALUE path)
{
return unix_connect(klass, path, 0);
}
|