Author Topic: Is TNet using something like Protobuf?  (Read 2626 times)

Rexima

  • Jr. Member
  • **
  • Thank You
  • -Given: 7
  • -Receive: 2
  • Posts: 78
    • View Profile
Is TNet using something like Protobuf?
« on: August 16, 2017, 05:10:50 AM »
Hi,

is TNet using something like Protobuf or Messagepack?
Or is it possible to extend TNet with one of them?

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Is TNet using something like Protobuf?
« Reply #1 on: August 16, 2017, 04:25:19 PM »
No...? TNet comes with its own extremely extensive binary serialization. Serialization exists for every data type.

That's like asking if 7zip uses compression :P

Rexima

  • Jr. Member
  • **
  • Thank You
  • -Given: 7
  • -Receive: 2
  • Posts: 78
    • View Profile
Re: Is TNet using something like Protobuf?
« Reply #2 on: August 16, 2017, 04:30:46 PM »
I ask, because the original BinaryFormatter from the .Net Framework is much slower than Protobuf or MsgPack.

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Is TNet using something like Protobuf?
« Reply #3 on: August 16, 2017, 04:47:50 PM »
Ah, it only uses BinaryFormatter as a fallback, I think. Most of it uses BinaryWriter & BinaryReader which I think is the absolute best you can get as it's basically just raw stream operations at that point. You can take a look at TNet/Common/TNSerializer.cs for all of TNet's serialization. It's beefy.

Rexima

  • Jr. Member
  • **
  • Thank You
  • -Given: 7
  • -Receive: 2
  • Posts: 78
    • View Profile
Re: Is TNet using something like Protobuf?
« Reply #4 on: August 16, 2017, 07:25:23 PM »
Okay thank you very much