cloud test
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
#define PICLOUDSERVER_H
|
||||
|
||||
#include "pip_cloud_export.h"
|
||||
#include "piiodevice.h"
|
||||
#include "piethernet.h"
|
||||
|
||||
class PIEthernet;
|
||||
|
||||
@@ -40,9 +40,12 @@ public:
|
||||
protected:
|
||||
bool openDevice();
|
||||
bool closeDevice();
|
||||
int readDevice(void * read_to, int max_size);
|
||||
int writeDevice(const void * data, int max_size);
|
||||
|
||||
private:
|
||||
PIEthernet * eth;
|
||||
PIEthernet eth;
|
||||
|
||||
};
|
||||
|
||||
#endif // PICLOUDSERVER_H
|
||||
|
||||
@@ -564,8 +564,9 @@ bool PIEthernet::connect(bool threaded) {
|
||||
PRIVATE->addr_.sin_len = sizeof(PRIVATE->addr_);
|
||||
#endif
|
||||
connected_ = (::connect(sock, (sockaddr * )&PRIVATE->addr_, sizeof(PRIVATE->addr_)) == 0);
|
||||
if (!connected_)
|
||||
if (!connected_) {
|
||||
piCoutObj << "Can`t connect to" << addr_r << "," << ethErrorString();
|
||||
}
|
||||
opened_ = connected_;
|
||||
if (connected_) {
|
||||
connecting_ = false;
|
||||
|
||||
Reference in New Issue
Block a user