mirror of
https://github.com/pschatzmann/arduino-audio-tools.git
synced 2024-09-21 10:27:27 +00:00
set server port
This commit is contained in:
parent
1dc5c7e0c0
commit
394de8b50e
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user