set server port

This commit is contained in:
Phil Schatzmann 2022-11-20 17:31:27 +01:00
parent 1dc5c7e0c0
commit 394de8b50e

View File

@ -34,8 +34,7 @@ class AudioServer {
AudioServer(int port=80) {
// the client returns 0 for avialableForWrite()
copier.setCheckAvailableForWrite(false);
WiFiServer tmp(port);
server = tmp;
setupServer(port);
}
@ -50,8 +49,7 @@ class AudioServer {
this->password = (char*)password;
// the client returns 0 for avialableForWrite()
copier.setCheckAvailableForWrite(false);
WiFiServer tmp(port);
server = tmp;
setupServer(port);
}
/**
@ -161,6 +159,11 @@ class AudioServer {
StreamCopy copier;
BaseConverter<int16_t> *converter_ptr = nullptr;
void setupServer(int port) {
WiFiServer tmp(port);
server = tmp;
}
void connectWiFi() {
TRACED();
if (WiFi.status() != WL_CONNECTED && network!=nullptr && password != nullptr){