is that possible? is there a way to force processing of the server_data event in response to some client event? I think I understand from the TCP::notify documentation that it’s possible to trigger user_request and response events. I was just curious if there was a way to force processing of server_data based on a client event.
According to the documentation SERVER_DATA event is triggered when new data is received from the target node after TCP::collect command has been issued. So I suppose you could base in the following:
when CLIENT_ACCEPTED {
TCP::collect
}
when SERVER_DATA {
code here
{
However, I have never tested anything like this. So a bit of experimentation might be needed or someone in the forum that has done this could respond with a better answer.
I hope this helps,
CB
There is no way to do that. SERVER_DATA is only triggered when the server sends data and there’s a TCP collect on the server side. You can’t be guaranteed to start that collect in CLIENT_DATA because there may not be a server side connection yet. The best way is to set a variable in whatever event you are in when you know you need to collect server data, and then do something like:
when SERVER_CONNECTED {
if { $need_to_collect } {
TCP::collect
}
}
Looks the better answer won ![]()