Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Latest commit

 

History

History
220 lines (138 loc) · 8.07 KB

README.md

File metadata and controls

220 lines (138 loc) · 8.07 KB

ESPAsyncTCP Library (forked copy)

GitHub release contributions welcome GitHub issues



Table of contents



Important Notes

The new ESP8266 cores v3.0.2+ introduces many new breaking features, such as replacing axtls with bearssl, as well as good ones such as LwIP Ethernet W5500lwIP, W5100lwIP and ENC28J60lwIP libraries.

Because the original ESPAsyncTCP library is not well maintained to cope with dynamic environment of new cores, features, etc., this forked ESPAsyncTCP library is created as an effort to try the best to keep up with the fast changes and avoid compile errors in future cores or dependent libraries.

Hopefully the bearssl feature of new ESP8266 cores will be added to this library in the near future to support SSL.


Why do we need this ESPAsyncTCP library

Features

This library is based on, modified from:

  1. Hristo Gochkov's ESPAsyncTCP

to apply the better and faster asynchronous feature of the powerful ESPAsyncTCP Library with SSL, and will be the base for other more advanced Async libraries for ESP8266, such as ESPAsyncWebServer, AsyncHTTPRequest, AsyncHTTPSRequest, 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. ESP8266 boards


Async TCP Library for ESP8266 Arduino

For ESP32, check AsyncTCP or AsyncTCP_SSL

Join the chat at https://gitter.im/me-no-dev/ESPAsyncWebServer

This is a fully asynchronous TCP library, aimed at enabling trouble-free, multi-connection network environment for Espressif's ESP8266 MCUs, using WiFi or LwIP Ethernet (W5500lwIP, W5100lwIP and ENC28J60lwIP libraries)

This library is the base for ESPAsyncWebServer


Documentation

AsyncClient and AsyncServer

The base classes on which everything else is built. They expose all possible scenarios, but are really raw and require more skills to use.

AsyncPrinter

This class can be used to send data like any other Print interface (Serial for example).

The object then can be used outside of the Async callbacks (the loop) and receive asynchronously data using onData. The object can be checked if the underlying AsyncClient is connected, or hook to the onDisconnect callback.

AsyncTCPbuffer

This class is really similar to the AsyncPrinter, but it differs in the fact that it can buffer some of the incoming data.

SyncClient

It is exactly what it sounds like. This is a standard, blocking TCP Client, similar to the one included in ESP8266WiFi



Examples

  1. Client
  2. Server
  3. SyncClient


Libraries and projects that use ESPAsyncTCP


and many more to come.



Issues

Submit issues to: ESPAsyncTCP issues


TO DO

  1. Search for bug and improvement.
  2. Add bearssl Async features for new cores
  3. Remove hard-code if possible

DONE

  1. Try to convert to use with new ESP8266 cores v3.0.2+ without axtls support
  2. Add Table of Contents
  3. Modify examples\
  4. Add astyle using allman style. Restyle the library


Contributions and Thanks

Many thanks for everyone for bug reporting, new feature suggesting, testing and contributing to the development of this library.

Contributions and Thanks

  1. Based on and modified from Hristo Gochkov's ESPAsyncTCP. Many thanks to Hristo Gochkov for great ESPAsyncTCP Library
me-no-dev
⭐️⭐️ Hristo Gochkov


Contributing

If you want to contribute to this project:

  • Report bugs and errors
  • Ask for enhancements
  • Create issues and pull requests
  • Tell other people about this library


License

  • The library is licensed under LGPLv3

Copyright

  • Copyright (c) 2016- Hristo Gochkov
  • Copyright (c) 2022- Khoi Hoang