src/sock_tcp.h
author Tero Marttila <terom@fixme.fi>
Tue, 28 Apr 2009 22:36:36 +0300
branchnew-transport
changeset 157 1e5674d0eec4
parent 155 c59d3eaff0fb
child 169 e6a1ce44aecc
permissions -rw-r--r--
fixed fifo
#ifndef SOCK_TCP_H
#define SOCK_TCP_H

/**
 * @file
 *
 * TCP transport implementation.
 *
 * XXX: provide some TCP-specific type/functions?
 */
#include "transport.h"

/**
 * Connect the given transport via TCP to the given host/service. The transport will not be ready for use until the
 * transport_callbacks::on_connect callback has been invoked.
 *
 * XXX: blocking DNS resolution
 *
 * @param info the transport setup info
 * @param transport_ptr returned transport
 * @param host the hostname to connect to
 * @param service the service name (i.e. port) to connect to
 * @param err returned error info
 */
err_t sock_tcp_connect (const struct transport_info *info, transport_t **transport_ptr, 
        const char *host, const char *service, error_t *err);

#endif