Basic TCP Multiclient Example

Demonstrates how to forward data between the UART and multiple TCP server clients.

API Features Demonstrated

Platforms

This app works on:

Requirements and Prerequisites

Requires a Gecko OS evaluation board, such as a WGM160P_eval.

Other Gecko OS hardware can also be used by changing the source of the logged data to suit your device.

Resources

The initialization file resources/settings.ini is packaged with the app and downloaded to the device.

Description

Demonstrates how to forward data between the UART and multiple TCP server clients.

Hardware IRQ

Note that this example uses a UART IRQ callback, which has high priority and must contain simple code that does not block. See main.c, uart_rx_callback. The function uart_rx_callback issues the event uart_rx_event_handler to shift more complex processing into the App thread context, as follows:

gos_event_issue(uart_rx_event_handler, NULL, GOS_EVENT_FLAGS1(FROM_IRQ)) 

See also: Execution Context, Hardware IRQ.

Implementation

Source

See: