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
389
390
391
392
393
394
395
396
397
398
399
400
401
402
|
# File 'ext/init.c', line 389
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);
rb_thread_blocking_region(nanomsg_run_device_no_gvl, &dop, RUBY_UBF_IO, 0);
if (dop.err < 0)
RAISE_SOCK_ERROR;
return Qnil;
}
|
.run_loopback(a) ⇒ Object
404
405
406
407
408
409
410
411
412
413
414
415
416
417
|
# File 'ext/init.c', line 404
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
rb_thread_blocking_region(nanomsg_run_device_no_gvl, &dop, RUBY_UBF_IO, 0);
if (dop.err < 0)
RAISE_SOCK_ERROR;
return Qnil;
}
|
.terminate ⇒ Object
366
367
368
369
370
371
372
|
# File 'ext/init.c', line 366
static VALUE
nanomsg_terminate(VALUE self)
{
nn_term();
return Qnil;
}
|