terom@219: #ifndef LIBQMSK_TCP_H terom@219: #define LIBQMSK_TCP_H terom@155: terom@155: /** terom@155: * @file terom@155: * terom@177: * TCP transport/service implementation. terom@155: * terom@155: * XXX: provide some TCP-specific type/functions? terom@155: */ terom@155: #include "transport.h" terom@177: #include "service.h" terom@155: terom@155: /** terom@155: * Connect the given transport via TCP to the given host/service. The transport will not be ready for use until the terom@155: * transport_callbacks::on_connect callback has been invoked. terom@155: * terom@155: * XXX: blocking DNS resolution terom@155: * terom@155: * @param info the transport setup info terom@155: * @param transport_ptr returned transport terom@155: * @param host the hostname to connect to terom@155: * @param service the service name (i.e. port) to connect to terom@155: * @param err returned error info terom@155: */ terom@177: err_t tcp_connect (const struct transport_info *info, transport_t **transport_ptr, terom@155: const char *host, const char *service, error_t *err); terom@155: terom@177: /** terom@177: * Create a passive/listening TCP socket on the given interface/port (NULL to pick automatically). terom@177: */ terom@177: err_t tcp_listen (const struct service_info *info, service_t **service_ptr, terom@177: const char *interface, const char *service, error_t *err); terom@177: terom@155: #endif