lunar-mining 4 лет назад
Родитель
Сommit
3d8c0bbe78

+ 3 - 3
doc/src/SUMMARY.md

@@ -36,9 +36,9 @@
       - [Seed node](learn/dchat/local-deployment/seed-node.md)
       - [Deployment](learn/dchat/local-deployment/deployment.md)
     - [Creating dchat](learn/dchat/creating-dchat/creating-dchat.md)
-      - [Custom message](learn/dchat/creating-dchat/custom-message.md)
-      - [Understanding protocols](learn/dchat/creating-dchat/understanding-protocols.md)
-      - [Custom protocols](learn/dchat/creating-dchat/custom-protocol.md)
+      - [Message](learn/dchat/creating-dchat/message.md)
+      - [Protocols](learn/dchat/creating-dchat/protocols.md)
+      - [ProtocolDchat](learn/dchat/creating-dchat/protocol-dchat.md)
       - [Registering a protocol](learn/dchat/creating-dchat/register-protocol.md)
       - [Sending messages](learn/dchat/creating-dchat/sending-messages.md)
       - [Slap on a UI](learn/dchat/creating-dchat/ui.md)

+ 1 - 1
doc/src/learn/dchat/creating-dchat/creating-dchat.md

@@ -1,4 +1,4 @@
-## Part 2: Creating dchat
+# Part 2: Creating dchat
 
 Now that we've deployed a local version of the p2p network, we can start
 creating a custom protocol and message types that dchat will use to

+ 1 - 1
doc/src/learn/dchat/creating-dchat/custom-message.md

@@ -1,4 +1,4 @@
-### Creating a custom Message type
+# Creating a Message type
 
 We'll start by creating a custom Message type called Dchatmsg. This is the
 data structure that we'll use to send messages between dchat instances.

+ 1 - 1
doc/src/learn/dchat/creating-dchat/custom-protocol.md

@@ -1,4 +1,4 @@
-### Writing a custom protocol
+# ProtocolDchat
 
 Let's start tying these concepts together. We'll define a struct called
 ProtocolDchat that contains a MessageSubscription to Dchatmsg and a

+ 1 - 1
doc/src/learn/dchat/creating-dchat/register-protocol.md

@@ -1,4 +1,4 @@
-### Registering a protocol
+# Registering a protocol
 
 We've now successfully created a custom protocol. The next step is the
 register the protocol with the protocol registry.

+ 1 - 1
doc/src/learn/dchat/creating-dchat/sending-messages.md

@@ -1,4 +1,4 @@
-### Sending messages
+# Sending messages
 
 The core of our application has been built. All that's left is to add a UI
 that takes user input, creates a Dchatmsg and sends it over the network.

+ 1 - 1
doc/src/learn/dchat/creating-dchat/ui.md

@@ -1,4 +1,4 @@
-### Slap on a UI
+# Slap on a UI
 
 We'll create a new method called menu() inside the Dchat
 implementation. It implements a highly simple UI that allows a user to

+ 1 - 1
doc/src/learn/dchat/creating-dchat/understanding-protocols.md

@@ -1,4 +1,4 @@
-### Understanding protocols
+# Protocols
 
 We now need to implement a custom protocol which defines how our chat
 program interacts with the p2p network.

+ 1 - 1
doc/src/learn/dchat/creating-dchat/using-dchat.md

@@ -1,4 +1,4 @@
-### Using dchat
+# Using dchat
 
 We are finally ready to test our program. Spin up 5 different terminals.
 

+ 2 - 2
doc/src/learn/dchat/local-deployment/creating-and-running.md

@@ -1,4 +1,4 @@
-### Creating the p2p network
+# Creating the p2p network
 
 Now that we have initialized the network settings we can create an
 instance of the p2p network.
@@ -9,7 +9,7 @@ Add the following to main():
 let p2p = net::P2p::new(settings?.into()).await;
 ```
 
-### Running the p2p network
+# Running the p2p network
 
 We will next create a Dchat struct that will store all the data required
 by dchat. For now, it will just hold a pointer to the p2p network.

+ 1 - 1
doc/src/learn/dchat/local-deployment/deployment.md

@@ -1,4 +1,4 @@
-### Deploying a local network
+# Deploying a local network
 
 Get ready to spin up a bunch of different terminals. We are going to
 run 3 nodes: Alice and Bob and our seed node. To run the seed node,

+ 1 - 1
doc/src/learn/dchat/local-deployment/error-handling.md

@@ -1,4 +1,4 @@
-### Error handling 
+# Error handling 
 
 Before we continue, we need to quickly add some error handling to handle
 the case where a user forgets to add the command-line flag. We'll use a

+ 1 - 1
doc/src/learn/dchat/local-deployment/getting-started.md

@@ -1,4 +1,4 @@
-### Getting started
+# Getting started
 
 We'll create a new cargo directory and add DarkFi to our Cargo.toml,
 like so:

+ 1 - 1
doc/src/learn/dchat/local-deployment/inbound-and-outbound.md

@@ -1,4 +1,4 @@
-### Inbound and Outbound nodes
+# Inbound and Outbound nodes
 
 To create an instance of the p2p network, we must configure our p2p
 network settings into a type called net::Settings. These settings

+ 1 - 1
doc/src/learn/dchat/local-deployment/seed-node.md

@@ -1,4 +1,4 @@
-### The seed node
+# The seed node
 
 Let's create an instance of dchat inside our main function and pass the
 p2p network into it.  Then we'll add dchat::start() to our async loop

+ 1 - 1
doc/src/learn/dchat/local-deployment/writing-a-daemon.md

@@ -1,4 +1,4 @@
-### Writing a daemon
+# Writing a daemon
 
 DarkFi consists of many seperate daemons communicating with each other. To
 run the p2p network, we'll need to implement our own daemon.  So we'll