try to fix cloud again
This commit is contained in:
@@ -22,6 +22,7 @@ void DispatcherClient::start() {
|
||||
|
||||
|
||||
DispatcherClient::~DispatcherClient() {
|
||||
PIMutexLocker send_lock(mutex_send);
|
||||
piDeleteSafety(eth);
|
||||
}
|
||||
|
||||
@@ -43,28 +44,32 @@ void DispatcherClient::stop() {
|
||||
|
||||
void DispatcherClient::sendConnected(uint client_id) {
|
||||
piCoutObj << "sendConnected" << client_id;
|
||||
PIMutexLocker send_lock(mutex_send);
|
||||
tcp.sendConnected(client_id);
|
||||
}
|
||||
|
||||
|
||||
void DispatcherClient::sendDisconnected(uint client_id) {
|
||||
piCoutObj << "sendDisconnected" << client_id;
|
||||
PIMutexLocker send_lock(mutex_send);
|
||||
tcp.sendDisconnected(client_id);
|
||||
}
|
||||
|
||||
|
||||
void DispatcherClient::sendData(const PIByteArray & data) {
|
||||
if (tcp.role() == PICloud::TCP::Client)
|
||||
if (tcp.role() == PICloud::TCP::Client) {
|
||||
PIMutexLocker send_lock(mutex_send);
|
||||
tcp.sendData(data);
|
||||
else
|
||||
} else
|
||||
piCoutObj << "error sendData, invalid role";
|
||||
}
|
||||
|
||||
|
||||
void DispatcherClient::sendDataToClient(const PIByteArray & data, uint client_id) {
|
||||
if (tcp.role() == PICloud::TCP::Server)
|
||||
if (tcp.role() == PICloud::TCP::Server) {
|
||||
PIMutexLocker send_lock(mutex_send);
|
||||
tcp.sendData(data, client_id);
|
||||
else
|
||||
} else
|
||||
piCoutObj << "error sendDataToClient, invalid role";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user