---
title: "W6100 khoih-prog / HTTPS_Server_Generic"
url: "https://maker.wiznet.io/eric_g/projects/khoih-prog-https-server-generic/"
markdown_url: "https://maker.wiznet.io/eric_g/projects/khoih-prog-https-server-generic/md"
type: "UCC: User Created Content"
author: "khoih-prog"
author_url: "https://github.com/khoih-prog/HTTPS_Server_Generic"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "khoih-prog"
original_url: "https://github.com/khoih-prog/HTTPS_Server_Generic"
published: "2023-02-01"
language: "en"
likes: 9
views: 404
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# W6100 khoih-prog / HTTPS_Server_Generic

> This library is based on, modified from: - Frank Hessel's esp32_https_server - Khoi Hoang's ESP32_HTTPS_Server

Original author: khoih-prog (source: https://github.com/khoih-prog/HTTPS_Server_Generic)

## Documents and links

- [HTTP Server Generic](https://github.com/khoih-prog/HTTPS_Server_Generic) (code)

## Article

### Start the Server

A call to [**HTTPServer::start()**](https://khoih-prog.github.io/HTTPS_Server_Generic_docs/classhttpsserver_1_1HTTPServer.html#a1b1b6bce0b52348ca5b5664cf497e039) will start the server so that it is listening on the previously specified port:

```
myServer.start();
```

This code usually goes into your `setup()` function. You can use `HTTPServer::isRunning()` to check whether the server started successfully.

By default, you need to pass control to the server explicitly. This is done by calling the [**HTTPServer::loop()**](https://khoih-prog.github.io/HTTPS_Server_Generic_docs/classhttpsserver_1_1HTTPServer.html#af8f68f5ff6ad101827bcc52217249fe2) function, which you usually will put into your Arduino sketch's `loop()` function. Once called, the server will first check for incoming connection (up to the maximum connection count that has been defined in the constructor), and then handle every open connection if it has new data on the socket. So your request handler functions will be called during the call to `loop()`. Note that if one of your handler functions is blocking, it will block all other connections as well.

---

### Running the Server asynchronously

If you want to have the server running in the background (and not calling `loop()` by yourself every few milliseconds), you can make use of the ESP32's task feature and put the whole server in a separate task.

See the [**Async-Server** example](https://github.com/khoih-prog/HTTPS_Server_Generic/tree/main/examples/ESP32_WiFi/Async-Server) to see how this can be done.

### How to connect W5500, W6100 or ENC28J60 to ESP32_S2/S3/C3

##### W6100

`FULL_DUPLEX, 100Mbps`

[![](https://github.com/khoih-prog/HTTPS_Server_Generic/raw/main/Images/W6100.png)](https://github.com/khoih-prog/HTTPS_Server_Generic/raw/main/Images/W6100.png)

---

#### W5500

`FULL_DUPLEX, 100Mbps`

[![](https://github.com/khoih-prog/HTTPS_Server_Generic/raw/main/Images/W5500.png)](https://github.com/khoih-prog/HTTPS_Server_Generic/raw/main/Images/W5500.png)

---

Source: https://maker.wiznet.io/eric_g/projects/khoih-prog-https-server-generic/
