Socket IO polling.
More...
◆ gf_sk_group_new()
Creates a new socket group
- Returns
- socket group object
◆ gf_sk_group_del()
Deletes a socket group
- Parameters
-
◆ gf_sk_group_register()
Registers a socket to a socket group
- Parameters
-
sg | socket group object |
sk | socket object to register |
◆ gf_sk_group_unregister()
Unregisters a socket from a socket group
- Parameters
-
sg | socket group object |
sk | socket object to unregister |
◆ gf_sk_group_select()
Performs a select (wait) on the socket group
- Parameters
-
sg | socket group object |
wait_usec | microseconds to wait (must be less than one second) |
mode | the operation mode desired |
- Returns
- error if any - if using a capture file and the capture is done, returns GF_IP_CONNECTION_CLOSED if TCP sockets are present, otherwise GF_EOS
◆ gf_sk_group_sock_is_set()
Checks if given socket is selected and can be read. This shall be called after gf_sk_group_select
- Parameters
-
sg | socket group object |
sk | socket object to check |
mode | the operation mode desired |
- Returns
- GF_TRUE if socket is ready to read, 0 otherwise