-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.1
55 lines (54 loc) · 1.28 KB
/
server.1
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
.\" Text automatically generated by txt2man
.TH server "17 December 2017" "" "Server's Man Page"
.SH NAME
\fBserver \fP- creates a new DHT server.
.SH SYNOPSIS
.nf
.fam C
\fBserver\fP [\fIip\fP] [\fIport\fP]
\fBclient\fP [\fIip\fP] [\fIport\fP] [get|put] [\fIhash\fP] {\fIip\fP-if-put}
.fam T
.fi
.fam T
.fi
.SH DESCRIPTION
\fBserver\fP is a low level C DHT program for storing and distributing (\fIhash\fP,IP)
tuples.
.PP
In the case of several servers operating on the same network, the servers will
share their data between each other through multicast.
.PP
\fBclient\fP needs only to know one DHT \fBserver\fP to operate.
.SH NETWORK COMMANDS
To send with netcat \fB-u\fP [\fIip\fP] [\fIport\fP]
.PP
put [\fIhash\fP] [\fIip\fP]
.PP
get [\fIhash\fP] [\fIip\fP]
.PP
plzgibhashes
.PP
kktakethis [\fIhash\fP] [\fIip\fP] [timestamp]
.SH OPTIONS
Both have no options.
.SH EXAMPLES
To create a local DHT \fBserver\fP and then populate it with one \fIhash\fP:
.PP
.nf
.fam C
$ server localhost 9090 & client
.fam T
.fi
To fetch the IP associated with a \fIhash\fP from a \fBserver\fP:
.PP
.nf
.fam C
$ client localhost 9090 get 3b64d11ff0ac5da6a262b34977bb3d29ae0a4c030947c11e1a0d9e51c848f772
.fam T
.fi
.SH SEE ALSO
\fBclient\fP(1), \fBipv6\fP(7)
.SH AUTHORS
Yarillo ([email protected])
.PP
Caswitch