Mercurial > irccd
comparison doc/html/dev/socket-protocol.md @ 512:b8da1d8c2a72
Docs: use ``` as fenced code blocks
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 20 Oct 2017 11:43:36 +0200 |
parents | a60142be369a |
children |
comparison
equal
deleted
inserted
replaced
511:f912379cc1a3 | 512:b8da1d8c2a72 |
---|---|
17 For example, this buffer will be parsed as two different messages. | 17 For example, this buffer will be parsed as two different messages. |
18 | 18 |
19 <div class="alert alert-success" role="alert"> | 19 <div class="alert alert-success" role="alert"> |
20 **Example**: two commands issued | 20 **Example**: two commands issued |
21 | 21 |
22 ````json | 22 ```json |
23 { | 23 { |
24 "param1": "value1" | 24 "param1": "value1" |
25 } | 25 } |
26 | 26 |
27 { | 27 { |
28 "param1": "value1" | 28 "param1": "value1" |
29 } | 29 } |
30 | 30 |
31 ```` | 31 ``` |
32 </div> | 32 </div> |
33 | 33 |
34 <div class="alert alert-warning" role="alert"> | 34 <div class="alert alert-warning" role="alert"> |
35 **Warning:** please note that the `\r\n\r\n`characters are the escape characters of line feed and new line, not the | 35 **Warning:** please note that the `\r\n\r\n`characters are the escape characters of line feed and new line, not the |
36 concatenation of `\` and `r`. | 36 concatenation of `\` and `r`. |
45 - **error**: (string) the error message if status is set to **error**. | 45 - **error**: (string) the error message if status is set to **error**. |
46 | 46 |
47 <div class="alert alert-success" role="alert"> | 47 <div class="alert alert-success" role="alert"> |
48 **Example**: command issued with no errors | 48 **Example**: command issued with no errors |
49 | 49 |
50 ````json | 50 ```json |
51 { | 51 { |
52 "command": "server-message", | 52 "command": "server-message", |
53 "status": "ok" | 53 "status": "ok" |
54 } | 54 } |
55 ```` | 55 ``` |
56 </div> | 56 </div> |
57 | 57 |
58 <div class="alert alert-danger" role="alert"> | 58 <div class="alert alert-danger" role="alert"> |
59 **Example**: command issued with errors | 59 **Example**: command issued with errors |
60 | 60 |
61 ````json | 61 ```json |
62 { | 62 { |
63 "command": "server-message", | 63 "command": "server-message", |
64 "status": "error", | 64 "status": "error", |
65 "error": "server xyz not found" | 65 "error": "server xyz not found" |
66 } | 66 } |
67 ```` | 67 ``` |
68 </div> | 68 </div> |