Hi, I have some questions about new Pipelines feature of com.unity.transform.
In sample project, there is no code for specifying which pipeline is used for receiving. Pipelines are only specified when sending. So, is it correct that incoming packets (NetworkEvent.Type.Data) are automatically pipelined and processed internally, then I can’t figure out that what pipeline is used for the incomming packet?
How big is the overhead of pipeline? For Null pipeline, it specified its header size as zero, but I think that there should be hidden overhead for specifying what pipeline is used for sending the packet.
The documentation says pipelines will wrap the messages in packets by appeding headers. For example the realability pipeline will add a header much similar to the headers used in TCP transport. Also probably the pipelines are indexed and numbered in order of creation. That’s why the creation of pipelines on client and server must match. When packets are sent on a pipeline, the transport will send few bytes indicating the index of the pipeline that was used for the packet. Performance wise the pipelines will also consume some small amount of memory for buffers and states, and may force packets to be sent again like the case with reliability pipeline.
Pipelines do not wrap messages by appending headers. There is only one kind of header, which is the UdpCHeader, that header has a flag which will be set to HasPipeline. Then directly after the header the pipeline will put its data before the user data starts.
When the NetworkDriver receives a message with the HasPipeline flag then it send the message to the NetworkPipelineProcessor which will take care of figuring out which pipelines it has to use.