libcoap  4.3.1
coap_tcp_internal.h
Go to the documentation of this file.
1 /*
2  * coap_tcp_internal.h -- TCP functions for libcoap
3  *
4  * Copyright (C) 2019--2020 Olaf Bergmann <bergmann@tzi.org> and others
5  *
6  * SPDX-License-Identifier: BSD-2-Clause
7  *
8  * This file is part of the CoAP library libcoap. Please see README for terms
9  * of use.
10  */
11 
17 #ifndef COAP_TCP_INTERNAL_H_
18 #define COAP_TCP_INTERNAL_H_
19 
20 #include "coap_internal.h"
21 #include "coap_io.h"
22 
30 #if !COAP_DISABLE_TCP
31 
48 int
50  const coap_address_t *local_if,
51  const coap_address_t *server,
52  int default_port,
53  coap_address_t *local_addr,
54  coap_address_t *remote_addr);
55 
67 int
69  coap_address_t *local_addr,
70  coap_address_t *remote_addr);
71 
84 int
86  const coap_address_t *listen_addr,
87  coap_address_t *bound_addr);
88 
102 int
104  coap_socket_t *new_client,
105  coap_address_t *local_addr,
106  coap_address_t *remote_addr);
107 
108 #endif /* !COAP_DISABLE_TCP */
109 
112 #endif /* COAP_TCP_INTERNAL_H_ */
Pulls together all the internal only header files.
Default network I/O functions.
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:199
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:44
int coap_socket_accept_tcp(coap_socket_t *server, coap_socket_t *new_client, coap_address_t *local_addr, coap_address_t *remote_addr)
Accept a new incoming TCP session.
Definition: coap_tcp.c:286
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:159
multi-purpose address abstraction
Definition: coap_address.h:96