Opcodes. Why? #943
danieloneill
started this conversation in
General
Replies: 1 comment
-
For a very slight bandwidth overhead improvement. Also because the v5 API is inspired by Discord's gateway API and that's what they do. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I don't understand the advantage of sending
op: 0
instead ofop: "hello"
.The operation name maps to the number, which is documented in protocol.md. Then in the code those numbers map to enumerated names of those things, which the code internally uses. Why use a numeric opcode instead of just the name of the actual operation?
Beta Was this translation helpful? Give feedback.
All reactions