The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix(docs): update user broadcast push docs (#40850)
Eduardo Gurgel639d2c06df52
diff --git a/apps/docs/content/guides/realtime/protocol.mdx b/apps/docs/content/guides/realtime/protocol.mdxindex bc7bbae988a..b823ffc50da 100644--- a/apps/docs/content/guides/realtime/protocol.mdx+++ b/apps/docs/content/guides/realtime/protocol.mdx@@ -124,7 +124,7 @@ The two special message types have a well defined binary format where the first+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Type (0x03) | Join Ref Size | Ref Size | Topic Size |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|User Event Size| Payload Enc. | Join Ref (variable length) |+|User Event Size| Metadata Size | Payload Enc. | Join Ref ... |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Ref (variable length) |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+@@ -132,6 +132,8 @@ The two special message types have a well defined binary format where the first+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| User Event (variable length) |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++| Metadata (variable length) |++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| User Payload (variable length) |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+```@@ -143,11 +145,13 @@ The two special message types have a well defined binary format where the first- **Ref Size**: 1 byte, size of reference string (max 255)- **Topic Size**: 1 byte, size of topic string (max 255)- **User Event Size**: 1 byte, size of user event string (max 255)+- **Metadata Size**: 1 byte, size of metadata string (max 255)- **Payload Encoding**: 1 byte (0 = binary, 1 = JSON)- **Join Ref**: Variable length string- **Ref**: Variable length string- **Topic**: Variable length string- **User Event**: Variable length string+- **Metadata**: Variable length JSON string- **User Payload**: Variable length payload data#### User Broadcast@@ -386,6 +390,7 @@ Below is the same example from the previous section, showing the binary frame st- Topic: `realtime:chat-room`- Payload encoding being JSON- User Event: `user-event`+- Metadata is empty- User Payload```@@ -394,6 +399,7 @@ Below is the same example from the previous section, showing the binary frame st0x01 // Ref Size0x12 // Topic Size0x0A // User Event Size+0x00 // Metadata Size0x01 // Payload Encoding (1 = JSON)10 // Actual Join Ref1 // Actual Ref