Jump to content

Question

Posted

So i've been diving into the code during my lunch break and i noticed several things but only one made me curious.

 

Why are you using a Long as your packets opcode and not a byte?

Is there any weird black magic i am not aware of?

 

Thanks.

 

8 answers to this question

Recommended Posts

  • 0
Posted
2 hours ago, Elfocrash said:

I have no intention to study it, i've written networking for multiple gameservers.

 

I am curious about why that came to be.

 

2 hours ago, Kibbelz said:

Considering @SPQR Panda is rewriting networking for the next release i would't bother studying it.


It's a moot point why it came to be, and I doubt JC remembers why. It will likely be a short or a byte once I'm done with it, but probably for the sake of future-proofing it will be a short.
 

  • 0
Posted
Just now, Kibbelz said:

Considering @SPQR Panda is rewriting networking for the next release i would't bother studying it.

I have no intention to study it, i've written networking for multiple gameservers.

 

I am curious about why that came to be.

  • 0
Guest SherwiN
Posted
Just now, Elfocrash said:

Nah, decompiled it

 

Thought so

  • 0
Posted

Yeah makes more sense.

 

I personally like going for the group up choice of double byte for similar context (if you ever have more than 128 different packets for the default behavior), which removed the minor overhead and adds the needed depth, but straight short makes sense too.

Guest
This topic is now closed to further replies.
×
×
  • Create New...