blob: f008fd9ffeee9bc262e4d4436034f7dace023124 [file] [log] [blame]
sp_inproc(7)
============
NAME
----
sp_inproc - in-process transport mechanism
SYNOPSIS
--------
*#include <sp/sp.h>*
*#include <sp/inproc.h>*
DESCRIPTION
-----------
In-process transport allows to send messages between threads or modules inside a
process. In-process address is an arbitrary case-sensitive string preceded by
'inproc://' protocol specifier. All in-process addresses are visible from any
module within the process. They are not visible from outside of the process.
The nature of in-process transport makes it easy to pass pointers between
threads instead of actual data. This is, however, considered a bad application
design and violates the scalable share-nothing architecture. If you do pass
pointers among threads, synchronising thread access to shared data becomes
your responsibility. Such design also prevents moving the thread into different
process or machine once the need arises. As a rule of the thumb, don't pass
pointers among threads unless you know what you are doing.
EXAMPLE
-------
----
sp_bind (s1, "inproc://test");
sp_connect (s2, "inproc://test);
----
SEE ALSO
--------
linknanomsg:sp_ipc[7]
linknanomsg:sp_tcp[7]
linknanomsg:sp_bind[3]
linknanomsg:sp_connect[3]
linknanomsg:nanomsg[7]
AUTHORS
-------
Martin Sustrik <sustrik@250bpm.com>