MCPcopy Create free account
hub / github.com/dillo-browser/dillo / init_dpi_socket

Function init_dpi_socket

dpid/dpid.c:662–674  ·  view source on GitHub ↗

! Initialize a single dpi socket * \Return * \li 1 on success * \li -1 on failure */

Source from the content-addressed store, hash-verified

660 * \li -1 on failure
661 */
662int init_dpi_socket(struct dp *dpi_attr)
663{
664 int s_fd, port, ret = -1;
665
666 if ((s_fd = bind_socket_fd(DPID_BASE_PORT, &port)) != -1) {
667 dpi_attr->sock_fd = s_fd;
668 dpi_attr->port = port;
669 FD_SET(s_fd, &sock_set);
670 ret = 1;
671 }
672
673 return ret;
674}
675
676/*! Setup sockets for the plugins and add them to
677 * the set of sockets (sock_set) watched by select.

Callers 1

init_all_dpi_socketsFunction · 0.85

Calls 1

bind_socket_fdFunction · 0.85

Tested by

no test coverage detected