Protocols - rsandila/traffic3 GitHub Wiki
The currently supported list of protocols are:
- UDP4
- UDP6
- TCP4
- TCP6
TCP is a state-full protocol. The server side will open one thread/listening socket for connecting client connection.
UDP is a state-less protocol. The server side will open a single thread/socket for all sending clients. Data will be sent back to the originator of the sending packet. Some operating systems may fail to send packets larger than the MTU of the network adapter (Eg. 1500 or 9000 depending on the configuration).
Support for other protocols can be added. Derive a new class from the Protocol class in protocol/protocol.h.
Because there is significant overlap between the IPV4 and IPV6 implementations of UDP and TCP both of them have a common base class that derive from Protocol. These classes are called ProtocolUDP and ProtocolTCP.
New classes should be registered in protocol/protocol_type.h in the ProtocolType enum.