Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Update DuinoCoin_Pool.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun authored Aug 10, 2021
1 parent b3a94ef commit 1c0ff90
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions DuinoCoin_Esp_Async_Master/DuinoCoin_Pool.ino
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ const char * urlPool = "http://51.15.127.80:4242/getPool";

void UpdateHostPort(String input)
{
// {"name":"pulse-pool-1","ip":"149.91.88.18","port":"6000","connections":0}
// {"ip":"server.duinocoin.com","port":2812,"name":"Main server"}
DynamicJsonDocument doc(256);
deserializeJson(doc, input);

const char* name = doc["name"];
const char* ip = doc["ip"];
const char* port = doc["port"];
int connections = doc["connections"];
int port = doc["port"];

Serial.println("[ ]Update " + String(name) + " " + String(ip) + " " + String(port));
SetHostPort(String(host), String(port).toInt());
SetHostPort(String(host), port);
}

void UpdatePool()
Expand Down

0 comments on commit 1c0ff90

Please sign in to comment.