|Top Previous Next|
Data redirection (sometimes referred to as "buffer shorting") allows to arrange efficient data exchange between ports, sockets, etc. in cases where no data alteration or parsing is necessary, while achieving maximum possible throughput is important.
The redir argument, as well as the value returned by this method are of "enum pl_redir" type. The pl_redir defines a set of platform inter-object constants that include all possible redirections for this platform. Specifying redir value of 0-PL_REDIR_NONE cancels redirection. When the redirection is enabled for a particular socket, the on_sock_data_arrival event is not generated for this port.
Once the RX buffer is redirected certain properties and methods related to the RX buffer will actually return the data for the TX buffer to which this RX buffer was redirected:
•sock.rxbuffsize will actually be returning the size of the TX buffer.
•sock.rxclear method will actually be clearing the TX buffer.
•sock.rxlen method will be showing the amount of data in the TX buffer.