An equivalent of windows socket in ESP(MCU) arduino environment. This library is an event driven with similar experience to windows socket.
This library can also be implemented as a client or server depending on the use case of the user. The server socket can handle multiple client connection depending on the HAC_SERVER_MAX_SOCKET_CLIENTS
definition(Note: Default value is 5 simultaneous client, it can be increase further but make sure to manage the memory it utilized for each session).
- Events supported as a Server Socket:
On Data Arrival
- Event raised when server receive a stream of data packet from the remote end client.
On New Connection
- Event raised when server accepted a new connection from the remote end client.
On Data Sent
- Event raised when server successfully send a data packet to the remote end client.
On Socket Closed
- Event raised when server close or remote end client close the active connection.
On Socket Error
- Event raised when server encounter a socket error on the existing connection to the remote end client.
On Poll
-
Event raised when server remote end client active connection is actively polling.
-
Events supported as a Client Socket:
On Data Arrival
- Event raised when client receive a stream of data packet from the remote end server.
On Connected
- Event raised when client established a connection to remore end server.
On Data Sent
- Event raised when client successfully send a data packet to the remote end server.
On Socket Closed
- Event raised when server close or remote end client close the active connection.
On Socket Error
- Event raised when client encounter a socket error on the existing connection to the remote end server.
On Poll
- Event raised when client active connection is actively polling from the remote end server.