| 39 | static const size_t WSL_MSG_SIZE_LEN = sizeof(uint16_t); |
| 40 | |
| 41 | void WebSerialClass::setAuthentication(const String& username, const String& password){ |
| 42 | _username = username; |
| 43 | _password = password; |
| 44 | _authenticate = !_username.isEmpty() && !_password.isEmpty(); |
| 45 | if (_ws != nullptr) { |
| 46 | _ws->setAuthentication(_username.c_str(), _password.c_str()); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | void WebSerialClass::begin(AsyncWebServer *server, const char* url) { |
| 51 | _server = server; |