SDK
- macOS 10.4–10.15Deprecated
Framework
- Kernel
Declaration
errno _t sock_inject_data_out(socket _t so, const struct sockaddr *to, mbuf _t data, mbuf _t control, sflt _data _flag _t flags);
Parameters
so
The socket to inject the data on.
to
The address the data should be sent to, only necessary on un-connected sockets. The caller is responsible for freeing the to address after sock_inject_data_out returns.
data
The data and possibly control mbufs.
control
The separate control mbufs.
flags
Flags indicating the type of data.
Return Value
0 on success otherwise the errno error. The data and control values are always freed regardless of return value.
Discussion
Inject data in to the send buffer of the socket as if it had come from the client.