-
Notifications
You must be signed in to change notification settings - Fork 0
/
write.7
112 lines (112 loc) · 3.62 KB
/
write.7
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
110
111
112
.\" Copyright (c) 1997 James P. Howard, II <jh@jameshoward.us>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.TH WRITE 7 "October 15, 1997" "Write" "Linux Programmer's Manual"
.SH NAME
write \- write protocol
.SH SYNOPSIS
The
.B write
protocol permits users to communicate with each other using the
traditional UNIX
.BR write (1)
sematics and environment.
.SH SPECIFICATIONS
.PP
.PD 0
.TP
{user.X} ::= username
.TP
{host.X} ::= hostname
.TP
{tty.X} ::= terminal
.TP
{lf} ::= line feed
.PD
.SH PROTOCOL
A
.B write
server is listens on TCP port decimal 811. When connected to, the server
reads a line-feed terminated line of text up to 1023 bytes from the
connected client. This line of text is in one of two very simply formats:
.PP
.RS
.PD 0
.TP
{user.1}@{host.1}@{tty.1} {user.2}{lf}
.PD
.RE
.PP
or
.PP
.RS
.PD 0
.TP
{user.1}@{host.1}@{tty.1} {user.2} {tty.2}{lf}
.PD
.RE
.PP
In both of these formats
.I {user.1}
refers to the calling user, usually their username. The username is
immedietly followed by an '@' symbol. Similarly,
.I {host.1}
refers to the local host of the caller, preferably the fully qualified
domain name. If a domain name is unavailible, a numerical IP address is
sufficent. This host name is again followed by an '@' symbol. Finally,
the caller's terminal device name (tty) is denoted by
.IR {tty.1} .
This block should be sufficient to uniquely identify the caller to the
recipient under any circumstances.
.PP
The caller block is now followed by an undefined number of spaces (ASCII
32). The following arguement passed is the target user's username and
is denoted by
.IR {user.1} .
This is again followed by and unspecified number of spaces. The final
arguement, listed as
.IR {tty.2} ,
is the target user's terminal name (tty). This command line is then
terminated via
.IR {lf} ,
a line feed.
.PP
Now, the client starts reading
.I {lf}
terminated lines of text from the server until the server sends a line
containing a single
.I {lf}
character. This permits the server to send any error messages or warnings
to the caller. Once the single
.I {lf}
character has been received, the server then goes into receive only mode
and all new data sent from the client is displayed to the receipient.
.SH SEE ALSO
.BR write (1),
.BR writed (8)
.SH HISTORY
The
.B write
protocol was developed at the Massachusetts Institute of Technology as
part of Project Athena.