|
NetBurner 3.5.6
PDF Version |
Advanced callback mechanism for asynchronous TCP socket event notification. More...
Typedefs | |
| typedef void | tcp_notify_handler(int tcpFd) |
| TCP notification callback function type. | |
Functions | |
| void | RegisterTCPReadNotify (int tcpFd, tcp_notify_handler *notifyHandler) |
| Register a callback for read event notifications. | |
| void | RegisterTCPWriteNotify (int tcpFd, tcp_notify_handler *notifyHandler) |
| Register a callback for write event notifications. | |
Advanced callback mechanism for asynchronous TCP socket event notification.
#include< tcp.h>
The TCP notification system provides an event-driven approach to handling TCP socket activity. Instead of polling sockets for read/write availability, applications can register callback functions that are automatically invoked when:
Callback functions have full access to normal TCP socket operations and can perform any standard read/write operations during notification handling.
| typedef void tcp_notify_handler(int tcpFd) |
#include <tcp.h>
TCP notification callback function type.
Applications implement callback functions of this type to handle TCP socket notifications. The callback is invoked from the TCP stack when the registered event occurs (data available for reading or buffer space available for writing).
| tcpFd | File descriptor of the socket that triggered the notification |
Expand for Example Usage
| void RegisterTCPReadNotify | ( | int | tcpFd, |
| tcp_notify_handler * | notifyHandler ) |
#include <tcp.h>
Register a callback for read event notifications.
Registers a callback function to be invoked whenever data becomes available for reading on the specified TCP socket. The callback is called automatically by the TCP stack when new data arrives.
| tcpFd | File descriptor of the socket to monitor |
| notifyHandler | Pointer to the callback function |
Expand for Example Usage
| void RegisterTCPWriteNotify | ( | int | tcpFd, |
| tcp_notify_handler * | notifyHandler ) |
#include <tcp.h>
Register a callback for write event notifications.
Registers a callback function to be invoked whenever buffer space becomes available for writing on the specified TCP socket. The callback is called automatically by the TCP stack when the transmit buffer has space available.
| tcpFd | File descriptor of the socket to monitor |
| notifyHandler | Pointer to the callback function |
Expand for Example Usage