chore(docs): update documentation about WRAC
This commit is contained in:
parent
4dda6cf9e5
commit
84b9b70d80
10
README.md
10
README.md
@ -18,10 +18,10 @@ It is strongly recommended to use Docker to host Racinfo. You can use the follow
|
||||
|
||||
```bash
|
||||
docker build -t racinfo .
|
||||
docker up -d racinfo
|
||||
docker up -d -p 8085:8085 racinfo
|
||||
```
|
||||
|
||||
Racinfo by default hosts on port 8085. You can change it by using the `-p` flag in the `docker up` command, like this:
|
||||
By default, Racinfo runs on port 8085. You can change this by using the -p flag with the docker run command, like this:
|
||||
|
||||
```bash
|
||||
# Instead of 8085, you can use any port you want, like 3000
|
||||
@ -48,8 +48,8 @@ You can also contribute by improving the documentation or fixing bugs.
|
||||
|
||||
Also, you should get acknowledged with these rules before contributing:
|
||||
|
||||
- The project should be related to Real Address Chat protocol, or its successors.
|
||||
- Your project should have a Git repository, or link to its download page. We do not accept projects that are not hosted on Git or have a download link.
|
||||
- The project should be related to the Real Address Chat protocol or its successors.
|
||||
- Your project should have a Git repository or a link to its download page. We do not accept projects that are not hosted on Git or do not provide a download link.
|
||||
|
||||
If you want to add your project to the list, please follow these steps:
|
||||
|
||||
@ -57,4 +57,4 @@ If you want to add your project to the list, please follow these steps:
|
||||
2. Attach `add-client`, `add-server` or `add-tool` tag to the issue.
|
||||
3. Fill the issue template with the information about your tool as described in template.
|
||||
|
||||
If you are an author or maintainer of a project that is already listed in Racinfo, you can also open an Issue with the template **"Update Project"** to update the information about your project.
|
||||
If you are the author or maintainer of a project already listed in Racinfo, you can also open an issue using the **"Update Project"** template to update your project information.
|
||||
|
@ -28,25 +28,23 @@ export default function Wrac() {
|
||||
<Text>
|
||||
WRAC (WebSocket Real Address Chat) is a community-made successor to
|
||||
RAC that uses WebSockets instead of TCP. It uses the same requests as
|
||||
RAC, but you should send data in binary format. Also, you can use the
|
||||
same connection multiple times, what differs from the usual RAC, where
|
||||
you had to connect the server each time you made some request. That
|
||||
causes some differences in the messages receiving.
|
||||
RAC, but you should send data in binary format. Unlike regular RAC,
|
||||
you can use the same connection multiple times—in RAC, you had to
|
||||
reconnect to the server for every request. This changes how message
|
||||
receiving works.
|
||||
</Text>
|
||||
<Title id={"receiving-messages"}>Receiving messages</Title>
|
||||
<Text>
|
||||
As the connection now can be keep-alive, and the websocket uses messages
|
||||
for transactions, we can't just do the same as we did in RAC to get the messages.
|
||||
Since the connection can now be kept alive and WebSocket uses messages
|
||||
for transactions, we can’t retrieve messages the same way as in RAC.
|
||||
</Text>
|
||||
<Text>
|
||||
Now, to use those packets (<InlineCode>0x01</InlineCode> for normal reading and <InlineCode>0x02</InlineCode> for chunked reading),
|
||||
we need to let the server know that we want to use them, and not send
|
||||
messages (the same packet-ids). The way how to do this is just add the byte <InlineCode>0x00</InlineCode> to the start
|
||||
of packets. For example: <InlineCode>0x00</InlineCode> <InlineCode>0x01</InlineCode> for normal reading.
|
||||
</Text>
|
||||
<Text>
|
||||
This way we can separate the packets that receive data from the packet that receives the total size.
|
||||
In the sence of keep-alive, WRAC solves the main problem with usual RAC.
|
||||
Receiving messages in WRAC is done by sending a single packet to the
|
||||
server with two bytes. The first byte is <InlineCode>0x00</InlineCode>
|
||||
, which indicates that you want to receive messages, and the second
|
||||
byte is either <InlineCode>0x01</InlineCode> or{" "}
|
||||
<InlineCode>0x02</InlineCode>. These two bytes work the same way as in
|
||||
RAC.
|
||||
</Text>
|
||||
<Footer />
|
||||
</main>
|
||||
|
Loading…
x
Reference in New Issue
Block a user