threadedRead now const uchar *
pipacketextractor Header mode now more flexible fix splitTime mode more refactoring add virtual override to functions remove piforeach replace 0 to nullptr iterate over pimap via iterators replace CONNECTU to CONNECT# with compile time check
This commit is contained in:
@@ -132,8 +132,8 @@ protected:
|
||||
virtual void peerConnected(const PIString & name) {;}
|
||||
virtual void peerDisconnected(const PIString & name) {;}
|
||||
|
||||
EVENT_HANDLER2(bool, dataRead, uchar *, readed, int, size);
|
||||
EVENT_HANDLER2(bool, mbcastRead, uchar *, readed, int, size);
|
||||
EVENT_HANDLER2(bool, dataRead, const uchar *, readed, int, size);
|
||||
EVENT_HANDLER2(bool, mbcastRead, const uchar *, readed, int, size);
|
||||
|
||||
private:
|
||||
EVENT_HANDLER2(void, timerEvent, void * , data, int, delim);
|
||||
@@ -164,15 +164,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));}
|
||||
|
||||
bool openDevice();
|
||||
bool closeDevice();
|
||||
PIString constructFullPathDevice() const;
|
||||
void configureFromFullPathDevice(const PIString &full_path);
|
||||
PIPropertyStorage constructVariantDevice() const;
|
||||
void configureFromVariantDevice(const PIPropertyStorage & d);
|
||||
int readDevice(void * read_to, int max_size);
|
||||
int writeDevice(const void * data, int size);
|
||||
DeviceInfoFlags deviceInfoFlags() const {return PIIODevice::Reliable;}
|
||||
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;}
|
||||
|
||||
PeerInfo * quickestPeer(const PIString & to);
|
||||
bool sendToNeighbour(PeerInfo * peer, const PIByteArray & ba);
|
||||
|
||||
Reference in New Issue
Block a user