[Network Protocol] Reduce the size of OP codes
Moderator: ickputzdirwech
-
- Burner Inserter
- Posts: 12
- Joined: Thu Jun 02, 2016 6:26 pm
- Contact:
[Network Protocol] Reduce the size of OP codes
The OP code that starts each network message it two bytes long. There is no need for this; factorio will never have 256 different OP codes, let alone 65536. One byte is plenty.
Re: [Network Protocol] Reduce the size of OP codes
And where would we then put the session magic?
-
- Burner Inserter
- Posts: 12
- Joined: Thu Jun 02, 2016 6:26 pm
- Contact:
Re: [Network Protocol] Reduce the size of OP codes
As far as I can tell the session magic isn't currently being used. When a packet is received with a bad session magic, the server logs and error, then proceeds to process the packet. Assuming this isn't a bug, there is no need for the session magic. The ConnectionRequestID should be sufficient to uniquely identify the connection.