Process communication in widgets
Posted: Tue May 08, 2012 11:18 am
Hi all,
May be this is nothing to do with wxWidgets, But sure this forum will give some inputs.
I am develping an wxWidgets application with trace functionality. I have three process.
One process for managing GUI, It gets the data from the other two processes and displayes it in the textcontrol (wxRichText) . Other two processes are clients to the main process. I have used sockets for sending the data to the main process from the clients.
The data from clients are not in order and the events ( SOCKET_INPUT) in the sockets is delayed. Usually the data rate in clients are 2 - 50 socket message in 0.9 micro-seconds.
Is there any better approach to send the data to main process to solve the orderliness of the traces from the clients.
I was thinking of the following solutions:
1. UDP sockets (wxDatagramSocket) , main process blocks on the server sockets. But this has huge data loss.
2. List ( wxList ) in the shared memory. Can the list be used in global shared memory so that the data is written by the clients with some semaphore protection?
Kindly provide some inputs in wxWidgets
kps
May be this is nothing to do with wxWidgets, But sure this forum will give some inputs.
I am develping an wxWidgets application with trace functionality. I have three process.
One process for managing GUI, It gets the data from the other two processes and displayes it in the textcontrol (wxRichText) . Other two processes are clients to the main process. I have used sockets for sending the data to the main process from the clients.
The data from clients are not in order and the events ( SOCKET_INPUT) in the sockets is delayed. Usually the data rate in clients are 2 - 50 socket message in 0.9 micro-seconds.
Is there any better approach to send the data to main process to solve the orderliness of the traces from the clients.
I was thinking of the following solutions:
1. UDP sockets (wxDatagramSocket) , main process blocks on the server sockets. But this has huge data loss.
2. List ( wxList ) in the shared memory. Can the list be used in global shared memory so that the data is written by the clients with some semaphore protection?
Kindly provide some inputs in wxWidgets
kps