libcoap 4.3.5-develop-ea01661
Loading...
Searching...
No Matches
coap_strm_internal.h
Go to the documentation of this file.
1/*
2 * coap_strm_internal.h -- Stream (TCP) functions for libcoap
3 *
4 * Copyright (C) 2019--2025 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_STRM_INTERNAL_H_
18#define COAP_STRM_INTERNAL_H_
19
20#include "coap_internal.h"
21#include "coap_io.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
34#if !COAP_DISABLE_TCP
35
53 const coap_address_t *local_if,
54 const coap_address_t *server,
55 int default_port,
56 coap_address_t *local_addr,
57 coap_address_t *remote_addr);
58
71 coap_address_t *local_addr,
72 coap_address_t *remote_addr);
73
87 const coap_address_t *listen_addr,
88 coap_address_t *bound_addr);
89
105 coap_socket_t *new_client,
106 coap_address_t *local_addr,
107 coap_address_t *remote_addr,
108 void *extra);
109
120ssize_t coap_socket_write(coap_socket_t *sock, const uint8_t *data, size_t data_len);
121
132ssize_t coap_socket_read(coap_socket_t *sock, uint8_t *data, size_t data_len);
133
134#endif /* !COAP_DISABLE_TCP */
135
138#ifdef __cplusplus
139}
140#endif
141
142#endif /* COAP_STRM_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:231
ssize_t coap_socket_read(coap_socket_t *sock, uint8_t *data, size_t data_len)
Function interface for data stream receiving off a socket.
Definition coap_io.c:713
ssize_t coap_socket_write(coap_socket_t *sock, const uint8_t *data, size_t data_len)
Function interface for data stream sending off a socket.
Definition coap_io.c:654
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:65
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:322
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:192
Multi-purpose address abstraction.