Diff: [root] @ fe48f746a43 | faq | css

Modification

File created: 33188 hellnet/protocols/http/handshake [Diff]

diff --git a/hellnet/protocols/http/handshake b/hellnet/protocols/http/handshake
new file mode 100644
index 0000000..ac3dd66
-- /dev/null
++ b/hellnet/protocols/http/handshake
@@ -0,0 +1,26 @@
h1. *Handshake* resource

h2. Brief description

Introduce yourself to server

h2. Requests

h3. POST

h4. Parameters

* host -- Node hostname
* post -- Node port

h4. Description

Used to establish link between nodes. Server will then respond with @GET /hello@ to check whether information is true. If so, it will add client to its nodelist.

h4. Response

Always returns 200 OK status. Content may be one of:

* "OK" -- node was checked and added to nodelist
* "FAIL" -- node failed to be online when checked
* "EXISTS" -- node is already in nodelist
\ No newline at end of file

File: hellnet/protocols/http/hello [Diff]

diff --git a/hellnet/protocols/http/hello b/hellnet/protocols/http/hello
index c97fe42..e05a07d 100644
-- a/hellnet/protocols/http/hello
++ b/hellnet/protocols/http/hello
@@ -2,7 +2,7 @@ h1. *Hello* resource

h2. Brief description

"Hello" resource is located by path @/hello@. It must respond to HEAD and GET with status 200 OK if server is working. Also it can respond to POST requests to collect sender's node information.

h2. Requests

@@ -18,23 +18,4 @@ Used to check if Hellnet node is up.

h4. Response

Always returns 200 OK status.

h3. POST

h4. Parameters

* host -- Node hostname
* post -- Node port

h4. Description

Used to establish link between nodes. Server will then respond with @GET /hello@ to check whether information is true. If so, it will add client to its nodelist.

h4. Response

Always returns 200 OK status. Content may be one of:

* "OK" -- node was checked and added to nodelist
* "FAIL" -- node failed to be online when checked
* "EXISTS" -- node is already in nodelist

\ No newline at end of file
Always returns 200 OK status.
\ No newline at end of file

File: hellnet/protocols/http/index [Diff]

diff --git a/hellnet/protocols/http/index b/hellnet/protocols/http/index
index f9ebd5e..4ca4816 100644
-- a/hellnet/protocols/http/index
++ b/hellnet/protocols/http/index
@@ -4,7 +4,8 @@ Peers are passing queries via HTTP queries (like GET /chunks/0a/04588fab48f or P

h2. Query types

|_. Query |_. Path |_. Static/dynamic |_. Description | |_. Link
| GET | /chunks/([0-9a-f]+) | static | [[/hellnet/tech/chunk|Chunk]] with hash $1 |
| GET | /meta/([^/]+)/([^/]+) | static | List of chunks which are inserted with [[/hellnet/tech/metachunks|meta]] $1:$2 |
\ No newline at end of file
| GET, HEAD, POST HEAD | /hello | dynamic static | Check whether node is up | [[HTTP/hello]] |
\ No newline at end of file
| POST | /handshake | dynamic | Establish a link to node | [[HTTP/handshake]] |
\ No newline at end of file

By Voker57 on 2009-06-28 17:10:00 +0400 Powered by bitcheese wiki engine