Socket IO polling.
More...
◆ gf_sk_group_new()
GF_SockGroup* gf_sk_group_new |
( |
| ) |
|
Creates a new socket group
- Returns
- socket group object
◆ gf_sk_group_del()
void gf_sk_group_del |
( |
GF_SockGroup * |
sg | ) |
|
Deletes a socket group
- Parameters
-
◆ gf_sk_group_register()
void gf_sk_group_register |
( |
GF_SockGroup * |
sg, |
|
|
GF_Socket * |
sk |
|
) |
| |
Registers a socket to a socket group
- Parameters
-
sg | socket group object |
sk | socket object to register |
◆ gf_sk_group_unregister()
void gf_sk_group_unregister |
( |
GF_SockGroup * |
sg, |
|
|
GF_Socket * |
sk |
|
) |
| |
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