@@ -213,9 +213,8 @@ Building the same message in Go would be like this:
213213``` go
214214msg := &lime.Message {}
215215msg.SetContent (&lime.JsonDocument {
216- " text" : " Hello from Lime!" ,
217- " timestamp" : " 2022-03-23T00:00:00.000Z" ,
218- }).
216+ " text" : " Hello from Lime!" ,
217+ " timestamp" : " 2022-03-23T00:00:00.000Z" }).
219218 SetID (" 1" ).
220219 SetToString (" john" )
221220```
@@ -236,9 +235,8 @@ domain:
236235}
237236```
238237
239- Using custom MIME types enables the mapping of types from your code.
240- For that, these types need to implement the ` Document ` interface.
241-
238+ Using custom MIME types enables the mapping of documents with types from your code.
239+ For this to be possible, these types need to implement the ` lime.Document ` interface.
242240
243241``` go
244242type Image struct {
@@ -262,8 +260,8 @@ func init() {
262260}
263261```
264262
265- To send a message to john, you can use the ` SendMessage ` method that is implemented both by the ` lime.Server `
266- and ` lime.Client ` types:
263+ For instance, to send a message to the " john" addresss you can use the ` SendMessage ` method that is implemented both by
264+ the ` lime.Server ` and ` lime.Client ` types:
267265
268266``` go
269267msg := &lime.Message {}
@@ -274,8 +272,8 @@ msg.SetContent(lime.TextDocument("Hello from Lime!")).
274272err := client.SendMessage (context.Background (), msg)
275273```
276274
277- And for receiving messages, you can use a handler that can be registered during the instantiation of the client or the
278- server:
275+ And for receiving messages, you can use a message handler that can be registered during the instantiation of the client
276+ or the server:
279277
280278``` go
281279client := lime.NewClientBuilder ().
@@ -294,7 +292,8 @@ client := lime.NewClientBuilder().
294292A notification provide information about a message to its sender.
295293They are sent only for messages that have the ` id ` value defined.
296294
297- To illustrate, a node can notify to the sender that a message was received like this:
295+ To illustrate, a node may want to notify the sender that a message was received.
296+ It can be done like this:
298297
299298``` json
300299{
@@ -318,8 +317,8 @@ if msg.ID != "" {
318317}
319318```
320319
321- Notifications can be sent by intermediates - like the server that routes the message - or by the destination of the
322- message itself .
320+ Notifications can be sent by the ** destination of the message or by intermediates ** - like a server that routes the
321+ message.
323322
324323The protocol define the following notification events:
325324- ** accepted** : The message was received and accepted by an intermediate.
@@ -500,8 +499,7 @@ In Lime, the **client can receive and process commands requests** from other nod
500499
501500### Session
502501
503- > The session establishment flow is automatically handled by the library.
504- > This section is for informative purposes only.
502+ > Note: The session establishment flow is automatically handled by the library.
505503
506504The session envelope is used for the negotiation, authentication and establishment of the communication channel between
507505the client and a server.
0 commit comments