From dc2792aab9aecdf22080ebb2be1d9228ddaec003 Mon Sep 17 00:00:00 2001
From: MeexReay <127148610+MeexReay@users.noreply.github.com>
Date: Tue, 24 Jun 2025 13:56:06 +0300
Subject: [PATCH 1/3] docs(protocol): write about recv messages in wrac
---
src/app/protocol/wrac/page.tsx | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/src/app/protocol/wrac/page.tsx b/src/app/protocol/wrac/page.tsx
index 8b61c07..a8441c8 100644
--- a/src/app/protocol/wrac/page.tsx
+++ b/src/app/protocol/wrac/page.tsx
@@ -26,7 +26,25 @@ export default function Wrac() {
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.
+ 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 receiving messages.
+
+
Receiving messages
+
+ 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.
+
+
+ Now, to use those packets (0x01 for normal reading and 0x02 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 0x00 to the start
+ of packets. For example: 0x00 0x01 for normal reading.
+
+
+ This way we can separate the packets that receive data from the packet that receives the total size.
+ In this sense, WRAC solves a big problem with usual RAC.
From 6f39c7604c4d208b50bad90e762efd302b2d0d5d Mon Sep 17 00:00:00 2001
From: MeexReay
Date: Tue, 24 Jun 2025 14:07:57 +0300
Subject: [PATCH 2/3] fix: make wrac page compile
---
src/app/protocol/wrac/page.tsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/app/protocol/wrac/page.tsx b/src/app/protocol/wrac/page.tsx
index a8441c8..f285e74 100644
--- a/src/app/protocol/wrac/page.tsx
+++ b/src/app/protocol/wrac/page.tsx
@@ -4,6 +4,8 @@ import { ArrowLeft } from "lucide-react";
import Link from "next/link";
import Text from "@/components/blocks/Text";
import PageTitle from "@/components/blocks/PageTitle";
+import Title from "@/components/blocks/Title";
+import InlineCode from "@/components/blocks/InlineCode";
export default function Wrac() {
return (
@@ -34,7 +36,7 @@ export default function Wrac() {
Receiving messages
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.
+ for transactions, we can't just do the same as we did in RAC to get the messages.
Now, to use those packets (0x01 for normal reading and 0x02 for chunked reading),
From 69bb9416f9f852df530c1ced890f6b5ac3218547 Mon Sep 17 00:00:00 2001
From: MeexReay <127148610+MeexReay@users.noreply.github.com>
Date: Tue, 24 Jun 2025 14:11:53 +0300
Subject: [PATCH 3/3] docs: fix typos from wrac protocol
---
src/app/protocol/wrac/page.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/protocol/wrac/page.tsx b/src/app/protocol/wrac/page.tsx
index f285e74..cd97496 100644
--- a/src/app/protocol/wrac/page.tsx
+++ b/src/app/protocol/wrac/page.tsx
@@ -31,7 +31,7 @@ export default function Wrac() {
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 receiving messages.
+ causes some differences in the messages receiving.
Receiving messages
@@ -46,7 +46,7 @@ export default function Wrac() {
This way we can separate the packets that receive data from the packet that receives the total size.
- In this sense, WRAC solves a big problem with usual RAC.
+ In the sence of keep-alive, WRAC solves the main problem with usual RAC.