libcoap  4.3.0rc3
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  * This file is part of the CoAP library libcoap. Please see README for terms
7  * of use.
8  */
9 
15 #ifndef COAP_TCP_INTERNAL_H_
16 #define COAP_TCP_INTERNAL_H_
17 
18 #include "coap_io.h"
19 
27 #if !COAP_DISABLE_TCP
28 
45 int
47  const coap_address_t *local_if,
48  const coap_address_t *server,
49  int default_port,
50  coap_address_t *local_addr,
51  coap_address_t *remote_addr);
52 
64 int
66  coap_address_t *local_addr,
67  coap_address_t *remote_addr);
68 
81 int
83  const coap_address_t *listen_addr,
84  coap_address_t *bound_addr);
85 
99 int
101  coap_socket_t *new_client,
102  coap_address_t *local_addr,
103  coap_address_t *remote_addr);
104 
105 #endif /* !COAP_DISABLE_TCP */
106 
109 #endif /* COAP_TCP_INTERNAL_H_ */
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.
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.
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.
int coap_socket_connect_tcp2(coap_socket_t *sock, coap_address_t *local_addr, coap_address_t *remote_addr)
Complete the TCP Connection.
multi-purpose address abstraction
Definition: address.h:94