From: <Mat...@dl...> - 2011-12-07 18:06:53
|
Hi all, I encountered a Problem regarding the TCP connection. I am using Vista 1.12.0 from the tag. My intention is to create a master/slave setup where the Master is sending data to the slave via TCP. The Master is establishing a TCP connection using the "VistaConnectionIP" and using a "VistaMessageChannel" with this connection to transfer the data to the slave. The Data is written in a "VistaPropertyList" and transfered using the "WriteMsg (int iMethodToken, const VistaPropertyList &rList,VistaPropertyList &rAnswer)" method. The order to send the Data is triggered by an InteractionEvent on the Master's input devices (60+ events/second). The Slave on the other hand is using the MSGPORT to enable the master to connect to him. The messages ( VistaCommandEvent's) are parsed by a Class the is derived from the "VistaEventHandler". The communication struct is based on the VistaDemo 17 (Alice, Bob). The problem: The master is blocked by the "WriteMsg" method. Without this messaging the master uses to have ~160 frames per second, but when the Messaging is enabled this is reduced to 10 for 1 slave, 5 for 2 slaves and 3.3 for 3 slaves. Therefore the Slaves also receive the reduced amount of events. I have already tried the following things: - Disable the blocking of the connection: This has lead to the slaves getting only 5 Events and then releasing the port, so that the connection collapsed. The master went back to ~160 frames/second, but the slave did not receive any more messages. - Disabled setting the answer of the slave Did not chance anything. Have you any suggestions to avoid this performance loss? Thanks for your help. Best regards Matthias |