'\" t .\" Title: xs_inproc .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 06/13/2012 .\" Manual: Crossroads I/O Manual .\" Source: Crossroads I/O 1.2.0 .\" Language: English .\" .TH "XS_INPROC" "7" "06/13/2012" "Crossroads I/O 1\&.2\&.0" "Crossroads I/O Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" xs_inproc \- local in\-process (inter\-thread) transport .SH "SYNOPSIS" .sp The in\-process transport passes messages via memory directly between threads sharing a single \fIcontext\fR\&. .SH "ADDRESSING" .sp A Crossroads address string consists of two parts as follows: \fItransport\fR://\fIendpoint\fR\&. The \fItransport\fR part specifies the underlying transport protocol to use, and for the in\-process transport shall be set to inproc\&. The meaning of the \fIendpoint\fR part for the in\-process transport is defined below\&. .SS "Assigning a local address to a socket" .sp When assigning a local address to a \fIsocket\fR using \fIxs_bind()\fR with the \fIinproc\fR transport, the \fIendpoint\fR shall be interpreted as an arbitrary string identifying the \fIname\fR to create\&. The \fIname\fR must be unique within the \fIcontext\fR associated with the \fIsocket\fR and may be up to 256 characters in length\&. No other restrictions are placed on the format of the \fIname\fR\&. .SS "Connecting a socket" .sp When connecting a \fIsocket\fR to a peer address using \fIxs_connect()\fR with the \fIinproc\fR transport, the \fIendpoint\fR shall be interpreted as an arbitrary string identifying the \fIname\fR to connect to\&. The \fIname\fR must have been previously created by assigning it to at least one \fIsocket\fR within the same \fIcontext\fR as the \fIsocket\fR being connected\&. .SH "WIRE FORMAT" .sp Not applicable\&. .SH "EXAMPLES" .PP \fBAssigning a local address to a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Assign the in\-process name "#1" */ rc = xs_bind(socket, "inproc://#1"); assert (rc != \-1); /* Assign the in\-process name "my\-endpoint" */ rc = xs_bind(socket, "inproc://my\-endpoint"); assert (rc != \-1); .fi .if n \{\ .RE .\} .PP \fBConnecting a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Connect to the in\-process name "#1" */ rc = xs_connect(socket, "inproc://#1"); assert (rc != \-1); /* Connect to the in\-process name "my\-endpoint" */ rc = xs_connect(socket, "inproc://my\-endpoint"); assert (rc != \-1); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBxs_bind\fR(3) \fBxs_connect\fR(3) \fBxs_ipc\fR(7) \fBxs_tcp\fR(7) \fBxs_pgm\fR(7) \fBxs\fR(7) .SH "AUTHORS" .sp The Crossroads documentation was written by Martin Sustrik <\m[blue]\fBsustrik@250bpm\&.com\fR\m[]\&\s-2\u[1]\d\s+2> and Martin Lucina <\m[blue]\fBmartin@lucina\&.net\fR\m[]\&\s-2\u[2]\d\s+2>\&. .SH "NOTES" .IP " 1." 4 sustrik@250bpm.com .RS 4 \%mailto:sustrik@250bpm.com .RE .IP " 2." 4 martin@lucina.net .RS 4 \%mailto:martin@lucina.net .RE