PICloud resolve addr
This commit is contained in:
@@ -62,9 +62,8 @@ void PICloudClient::setKeepConnection(bool on) {
|
|||||||
|
|
||||||
|
|
||||||
bool PICloudClient::openDevice() {
|
bool PICloudClient::openDevice() {
|
||||||
PIString p = path();
|
// piCout << "PICloudClient open device" << path();
|
||||||
// piCout << "PICloudClient open device" << p;
|
bool op = eth.connect(PIEthernet::Address::resolve(path()), false);
|
||||||
bool op = eth.connect(p, false);
|
|
||||||
if (op) {
|
if (op) {
|
||||||
mutex_buff.lock();
|
mutex_buff.lock();
|
||||||
eth.startThreadedRead();
|
eth.startThreadedRead();
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ PIVector<PICloudServer::Client *> PICloudServer::clients() const {
|
|||||||
|
|
||||||
bool PICloudServer::openDevice() {
|
bool PICloudServer::openDevice() {
|
||||||
piCout << "PICloudServer open device" << path();
|
piCout << "PICloudServer open device" << path();
|
||||||
bool op = eth.connect(path(), false);
|
bool op = eth.connect(PIEthernet::Address::resolve(path()), false);
|
||||||
if (op) {
|
if (op) {
|
||||||
eth.startThreadedRead();
|
eth.startThreadedRead();
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public:
|
|||||||
|
|
||||||
void setServerName(const PIString & server_name);
|
void setServerName(const PIString & server_name);
|
||||||
|
|
||||||
PIVector<Client *> clients() const;
|
PIVector<PICloudServer::Client *> clients() const;
|
||||||
|
|
||||||
EVENT1(newConnection, PICloudServer::Client * , client)
|
EVENT1(newConnection, PICloudServer::Client * , client)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user