|
FreeRDP
|
Pacing server output on the UDP tunnel for servers built with -DWITH_RDPEUDP_SERVER=ON. More...
#include <freerdp/api.h>#include <freerdp/types.h>#include <freerdp/peer.h>
Go to the source code of this file.
Data Structures | |
| struct | FreeRDP_UdpSendState |
| Link state for pacing encoders. Set size to sizeof(FreeRDP_UdpSendState) before calling. New fields replace reserved ones to ensure the size remains constant. More... | |
| struct | FreeRDP_UdpPeerCallbacks |
| Per-peer UDP callbacks, executed on the thread running the freerdp_peer check. Set size to sizeof(FreeRDP_UdpPeerCallbacks). New fields replace reserved ones to ensure the structure size remains constant. More... | |
Typedefs | |
| typedef void(* | psPeerUdpLinkChanged) (void *custom, FreeRDP_UdpLinkState state) |
| typedef void(* | psPeerUdpWriteUnblocked) (void *custom) |
Functions | |
| enum | WINPR_C23_ENUM_TYPE (uint32_t) |
| UDP connection state for a peer. | |
| WINPR_ATTR_NODISCARD FREERDP_API BOOL | freerdp_peer_set_udp_callbacks (freerdp_peer *peer, const FreeRDP_UdpPeerCallbacks *callbacks, void *custom) |
| WINPR_ATTR_NODISCARD FREERDP_API BOOL | freerdp_peer_get_udp_send_state (freerdp_peer *peer, FreeRDP_UdpSendState *state) |
Variables | |
| FreeRDP_UdpLinkState | |
Pacing server output on the UDP tunnel for servers built with -DWITH_RDPEUDP_SERVER=ON.
FreeRDP: A Remote Desktop Protocol Implementation Server side UDP multitransport
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Servers do not need this file to utilize the tunnel; each peer shares a process-wide UDP listener on the TCP address and port and is assigned a worker thread. Because the reliable tunnel does not drop data, servers producing data faster than the link capacity should check FreeRDP_UdpSendState and wait for WriteUnblocked.
This header is installed only if WITH_RDPEUDP_SERVER is defined in freerdp/config.h.
Definition in file udp.h.
| struct FreeRDP_UdpSendState |
Link state for pacing encoders. Set size to sizeof(FreeRDP_UdpSendState) before calling. New fields replace reserved ones to ensure the size remains constant.
| struct FreeRDP_UdpPeerCallbacks |
Per-peer UDP callbacks, executed on the thread running the freerdp_peer check. Set size to sizeof(FreeRDP_UdpPeerCallbacks). New fields replace reserved ones to ensure the structure size remains constant.
| Data Fields | ||
|---|---|---|
| ALIGN64 psPeerUdpLinkChanged | LinkChanged | |
| UINT64 | reserved[64 - 3] | |
| ALIGN64 size_t | size |
Set by the caller; see the struct description above. |
| ALIGN64 psPeerUdpWriteUnblocked | WriteUnblocked | |
| typedef void(* psPeerUdpLinkChanged) (void *custom, FreeRDP_UdpLinkState state) |
| typedef void(* psPeerUdpWriteUnblocked) (void *custom) |
| WINPR_ATTR_NODISCARD FREERDP_API BOOL freerdp_peer_get_udp_send_state | ( | freerdp_peer * | peer, |
| FreeRDP_UdpSendState * | state ) |
Retrieves the link state for pacing. Because the reliable tunnel cannot drop data, exceeding its queue limit will cause the tunnel to fail. The session terminates only if channels have already migrated to UDP; otherwise, it continues on TCP.
Definition at line 705 of file multitransport_server.c.
References FreeRDP_UdpSendState::rttMs, rdpUdpSendState::rttMs, FreeRDP_UdpSendState::size, FreeRDP_UdpSendState::writeBlocked, and rdpUdpSendState::writeBlocked.
| WINPR_ATTR_NODISCARD FREERDP_API BOOL freerdp_peer_set_udp_callbacks | ( | freerdp_peer * | peer, |
| const FreeRDP_UdpPeerCallbacks * | callbacks, | ||
| void * | custom ) |
Sets the UDP callbacks for a peer. This should be called after the peer context is created and before the tunnel is offered.
| callbacks | The callback hooks, or nullptr for none. |
Definition at line 669 of file multitransport_server.c.
References FreeRDP_UdpPeerCallbacks::size.
| enum WINPR_C23_ENUM_TYPE | ( | uint32_t | ) |
UDP connection state for a peer.
< No UDP connection exists or it failed; the peer remains on TCP.
< The tunnel is offered via TCP; the flow is now awaiting a SYN packet.
< A SYN provided the hash, but identity is unproven as the hash could be intercepted
< The security cookie has been received within the tunnel's TLS session.
< Client has also accepted on TCP; the tunnel can now carry channel data.
Definition at line 1 of file udp.h.
References WINPR_C23_ENUM_TYPE().
Referenced by WINPR_C23_ENUM_TYPE().

