PIIODevice::bytesAvailible()
fix pistringlist pibinarystream write pibinarystream::binaryStreamSize() PIByteArray pibinarystream read with more size fix pistring pibinarystream read optimization fix bug in PIIOBinaryStream read and write if failed workaround in PIIOString::readDevice PISPI readDevice bug Fixed
This commit is contained in:
@@ -116,6 +116,8 @@ public:
|
||||
void setTrustPeerName(const PIString & peer_name) {trust_peer = peer_name;}
|
||||
void setTcpServerIP(const PIString & ip) {server_ip = ip; tcpClientReconnect();}
|
||||
|
||||
ssize_t bytesAvailible() const override;
|
||||
|
||||
|
||||
EVENT2(dataReceivedEvent, const PIString &, from, const PIByteArray &, data);
|
||||
EVENT1(peerConnectedEvent, const PIString &, name);
|
||||
@@ -164,15 +166,15 @@ private:
|
||||
void addToRemoved(const PeerInfo & pi) {removed[pi.name] = PIPair<int, PISystemTime>(pi.cnt, pi.time);}
|
||||
bool isRemoved(const PeerInfo & pi) const {return (removed.value(pi.name) == PIPair<int, PISystemTime>(pi.cnt, pi.time));}
|
||||
|
||||
virtual bool openDevice() override;
|
||||
virtual bool closeDevice() override;
|
||||
virtual PIString constructFullPathDevice() const override;
|
||||
virtual void configureFromFullPathDevice(const PIString &full_path) override;
|
||||
virtual PIPropertyStorage constructVariantDevice() const override;
|
||||
virtual void configureFromVariantDevice(const PIPropertyStorage & d) override;
|
||||
virtual int readDevice(void * read_to, int max_size) override;
|
||||
virtual int writeDevice(const void * data, int size) override;
|
||||
virtual DeviceInfoFlags deviceInfoFlags() const override {return PIIODevice::Reliable;}
|
||||
bool openDevice() override;
|
||||
bool closeDevice() override;
|
||||
PIString constructFullPathDevice() const override;
|
||||
void configureFromFullPathDevice(const PIString &full_path) override;
|
||||
PIPropertyStorage constructVariantDevice() const override;
|
||||
void configureFromVariantDevice(const PIPropertyStorage & d) override;
|
||||
int readDevice(void * read_to, int max_size) override;
|
||||
int writeDevice(const void * data, int size) override;
|
||||
DeviceInfoFlags deviceInfoFlags() const override {return PIIODevice::Reliable;}
|
||||
|
||||
PeerInfo * quickestPeer(const PIString & to);
|
||||
bool sendToNeighbour(PeerInfo * peer, const PIByteArray & ba);
|
||||
@@ -198,7 +200,7 @@ private:
|
||||
bool destroyed, no_timer;
|
||||
PIString trust_peer;
|
||||
PIString server_ip;
|
||||
PIMutex read_buffer_mutex;
|
||||
mutable PIMutex read_buffer_mutex;
|
||||
PIQueue<PIByteArray> read_buffer;
|
||||
int read_buffer_size;
|
||||
PIMutex mc_mutex, eth_mutex, peers_mutex, send_mutex, send_mc_mutex;
|
||||
|
||||
Reference in New Issue
Block a user