Hui Lin_Design principle under broccoli


During my experiment of my DNP3 analyzer, I found some phenomena. Perhaps in-depth understanding of the broccoli can help me to explain this. I build my experiment based on ping-pong example codes. The experiment is like this

DNP3 analyzer is in machine 1, periodically sending pong event (not depends on the receiving of ping event but depends on other DNP3 event ) to broccoli client in machine 2. (machine 1 and machine 2 are on the same Ethernet). When the broccoli receives pong event, the registered bro_pong function execute some other matlab module which takes some time of computations.

I find that if the periodically pong event is sent frequent enough, when the first pong event is still processed by bro_pong function, the second pong event will be received again. I am wondering how broccoli client handle this type of situation? It simply drops the second pong events, or store them into some buffer of the broccoli client and drops the event until the buffer is full?

I am catching a deadline next Thursday, so quick response is really appreciated.




Someone else will probably give a better answer, but I believe that if there are additional events sent before you check for events again they will be buffered in the socket buffer. If you expect to have large numbers of buffered events you should be able to increase your OS receive socket buffer size.


Correct, it's all going over a TCP connection so nothing will be
dropped (but things may block eventually if buffers are filled).