Module: NanoMsg
- Defined in:
- lib/nanomsg.rb,
lib/nanomsg/pair_socket.rb,
ext/init.c
Defined Under Namespace
Classes: BusSocket, PairSocket, PubSocket, PullSocket, PushSocket, RepSocket, ReqSocket, RespondSocket, Socket, SocketError, SubSocket, SurveySocket
Class Method Summary
collapse
Class Method Details
.run_device(a, b) ⇒ Object
443
444
445
446
447
448
449
450
451
452
453
454
455
456
|
# File 'ext/init.c', line 443
static VALUE
nanomsg_run_device(VALUE self, VALUE a, VALUE b)
{
struct device_op dop;
dop.sa = sock_get(a);
dop.sb = sock_get(b);
WITHOUT_GVL(nanomsg_run_device_no_gvl, &dop, RUBY_UBF_IO, 0);
if (dop.err < 0)
RAISE_SOCK_ERROR;
return Qnil;
}
|
.run_loopback(a) ⇒ Object
458
459
460
461
462
463
464
465
466
467
468
469
470
471
|
# File 'ext/init.c', line 458
static VALUE
nanomsg_run_loopback(VALUE self, VALUE a)
{
struct device_op dop;
dop.sa = sock_get(a);
dop.sb = -1; // invalid socket, see documentation
WITHOUT_GVL(nanomsg_run_device_no_gvl, &dop, RUBY_UBF_IO, 0);
if (dop.err < 0)
RAISE_SOCK_ERROR;
return Qnil;
}
|
.terminate ⇒ Object
420
421
422
423
424
425
426
|
# File 'ext/init.c', line 420
static VALUE
nanomsg_terminate(VALUE self)
{
nn_term();
return Qnil;
}
|