Loading...
Searching...
No Matches
coap_tcp_internal.h
Go to the documentation of this file.
/*
* coap_tcp_internal.h -- TCP functions for libcoap
*
* Copyright (C) 2019--2024 Olaf Bergmann <bergmann@tzi.org> and others
*
* SPDX-License-Identifier: BSD-2-Clause
*
* This file is part of the CoAP library libcoap. Please see README for terms
* of use.
*/
#ifndef COAP_TCP_INTERNAL_H_
#define COAP_TCP_INTERNAL_H_
#include "coap_internal.h"
#include "coap_io.h"
#if !COAP_DISABLE_TCP
int coap_socket_connect_tcp1(coap_socket_t *sock,
const coap_address_t *local_if,
const coap_address_t *server,
int default_port,
coap_address_t *local_addr,
coap_address_t *remote_addr);
int coap_socket_connect_tcp2(coap_socket_t *sock,
coap_address_t *local_addr,
coap_address_t *remote_addr);
int coap_socket_bind_tcp(coap_socket_t *sock,
const coap_address_t *listen_addr,
coap_address_t *bound_addr);
int coap_socket_accept_tcp(coap_socket_t *server,
coap_socket_t *new_client,
coap_address_t *local_addr,
coap_address_t *remote_addr,
void *extra);
#endif /* !COAP_DISABLE_TCP */
#endif /* COAP_TCP_INTERNAL_H_ */
coap_internal.h
Pulls together all the internal only header files.
coap_io.h
Default network I/O functions.
coap_socket_bind_tcp
int coap_socket_bind_tcp(coap_socket_t *sock, const coap_address_t *listen_addr, coap_address_t *bound_addr)
Create a new TCP socket and then listen for new incoming TCP sessions.
Definition coap_tcp.c:200
coap_socket_connect_tcp1
int coap_socket_connect_tcp1(coap_socket_t *sock, const coap_address_t *local_if, const coap_address_t *server, int default_port, coap_address_t *local_addr, coap_address_t *remote_addr)
Create a new TCP socket and initiate the connection.
Definition coap_tcp.c:43
coap_socket_accept_tcp
int coap_socket_accept_tcp(coap_socket_t *server, coap_socket_t *new_client, coap_address_t *local_addr, coap_address_t *remote_addr, void *extra)
Accept a new incoming TCP session.
Definition coap_tcp.c:291
coap_socket_connect_tcp2
int coap_socket_connect_tcp2(coap_socket_t *sock, coap_address_t *local_addr, coap_address_t *remote_addr)
Complete the TCP Connection.
Definition coap_tcp.c:161
coap_address_t
Multi-purpose address abstraction.
Definition coap_address.h:148
coap_socket_t
Definition coap_io_internal.h:38