File: xs_ipc.7

package info (click to toggle)
libxs 1.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 6,136 kB
  • ctags: 2,159
  • sloc: cpp: 16,233; sh: 10,244; ansic: 405; makefile: 354
file content (109 lines) | stat: -rw-r--r-- 3,831 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
'\" t
.\"     Title: xs_ipc
.\"    Author: [see the "AUTHORS" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\"      Date: 06/13/2012
.\"    Manual: Crossroads I/O Manual
.\"    Source: Crossroads I/O 1.2.0
.\"  Language: English
.\"
.TH "XS_IPC" "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_ipc \- local inter\-process transport
.SH "SYNOPSIS"
.sp
The inter\-process transport passes messages between local processes using a system\-dependent IPC mechanism\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.sp
The inter\-process transport is currently only implemented on operating systems that provide UNIX domain sockets\&.
.sp .5v
.RE
.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 inter\-process transport shall be set to ipc\&. The meaning of the \fIendpoint\fR part for the inter\-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 \fIipc\fR transport, the \fIendpoint\fR shall be interpreted as an arbitrary string identifying the \fIpathname\fR to create\&. The \fIpathname\fR must be unique within the operating system namespace used by the \fIipc\fR implementation, and must fulfill any restrictions placed by the operating system on the format and length of a \fIpathname\fR\&.
.SS "Connecting a socket"
.sp
When connecting a \fIsocket\fR to a peer address using \fIxs_connect()\fR with the \fIipc\fR transport, the \fIendpoint\fR shall be interpreted as an arbitrary string identifying the \fIpathname\fR to connect to\&. The \fIpathname\fR must have been previously created within the operating system namespace by assigning it to a \fIsocket\fR with \fIxs_bind()\fR\&.
.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 pathname "/tmp/feeds/0" */
rc = xs_bind(socket, "ipc:///tmp/feeds/0");
assert (rc != \-1);
.fi
.if n \{\
.RE
.\}
.PP
\fBConnecting a socket\fR. 
.sp
.if n \{\
.RS 4
.\}
.nf
/* Connect to the pathname "/tmp/feeds/0" */
rc = xs_connect(socket, "ipc:///tmp/feeds/0");
assert (rc != \-1);
.fi
.if n \{\
.RE
.\}
.sp
.SH "SEE ALSO"
.sp
\fBxs_bind\fR(3) \fBxs_connect\fR(3) \fBxs_inproc\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