Teensy41_AsyncTCP Library for QNEthernet

khoih-prog

Well-known member
Teensy41_AsyncTCP Library

How To Install Using Arduino Library Manager


Features

This library is based on, modified from:

This Teensy41_AsyncTCP Library is based on and modified from

- Hristo Gochkov's ESPAsyncTCP
- Hristo Gochkov's AsyncTCP

to apply the better and faster asynchronous feature of the powerful ESPAsyncTCP without SSL to Teensy 4.1 using LwIP-based QNEthernet Library, and will be the base for future or current and more advanced Async libraries, such as AsyncHTTPRequest_Generic, AsyncHTTPSRequest_Generic, Teensy41_AsyncWebServer, Teensy41_AsyncUDP, Teensy41_AsyncDNSServer, Teensy41_AsyncTCP_SSL, etc.


Why Async is better

- Using asynchronous network means that you can handle more than one connection at the same time
- You are called once the request is ready and parsed
- When you send the response, you are immediately ready to handle other connections while the server is taking care of sending the response in the background
- Speed is OMG
- Easy to use API, HTTP Basic and Digest MD5 Authentication (default), ChunkedResponse
- Easily extensible to handle any type of content
- Supports Continue 100
- Async WebSocket plugin offering different locations without extra servers or ports
- Async EventSource (Server-Sent Events) plugin to send events to the browser
- URL Rewrite plugin for conditional and permanent url rewrites
- ServeStatic plugin that supports cache, Last-Modified, default index and more
- Simple template processing engine to handle templates


Currently supported Boards

1. Teensy 4.1 using QNEthernet Library


Changelog

### Initial Releases v1.0.0

1. Initial porting and coding to support Teensy 4.1 using QNEthernet Library
2. Add example multiFileProject to demo for multiple-file project to avoid `multiple-definitions` linker error


Debug Terminal Output Sample

This is terminal debug output when running FullyFeatured_QNEthernet on TEENSY 4.1 + QNEthernet connecting to broker.emqx.io MQTT server. The AsyncMQTT_Generic relies on this library for Async MQTT connection.

Code:
Starting FullyFeatured_QNEthernet on TEENSY 4.1
AsyncMQTT_Generic v1.4.0 for Teensy 4.1 QNEthernet
Initialize Ethernet using static IP => Connected! IP address:192.168.2.222
Connecting to MQTT...
Connected to MQTT broker: broker.emqx.io, port: 1883
PubTopic: async-mqtt/Teensy41_QNEthernet_Pub
************************************************
Session present: 0
Subscribing at QoS 2, packetId: 1
Publishing at QoS 0
Publishing at QoS 1, packetId: 2
Publishing at QoS 2, packetId: 3
************************************************
Subscribe acknowledged.
  packetId: 1
  qos: 2
Publish received.
  topic: async-mqtt/Teensy41_QNEthernet_Pub
  message: Teensy41_QNEthernet_Pub Test3
  qos: 2
  dup: 0
  retain: 1
  len: 29
  index: 0
  total: 29
Publish acknowledged.
  packetId: 2
Publish received.
  topic: async-mqtt/Teensy41_QNEthernet_Pub
  message: Teensy41_QNEthernet_Pub Test1
  qos: 0
  dup: 0
  retain: 0
  len: 29
  index: 0
  total: 29
Publish received.
  topic: async-mqtt/Teensy41_QNEthernet_Pub
  message: Teensy41_QNEthernet_Pub Test2
  qos: 1
  dup: 0
  retain: 0
  len: 29
  index: 0
  total: 29
Publish received.
  topic: async-mqtt/Teensy41_QNEthernet_Pub
  message: Teensy41_QNEthernet_Pub Test3
  qos: 2
  dup: 0
  retain: 0
  len: 29
  index: 0
  total: 29
Publish acknowledged.
  packetId: 3
 
Back
Top