mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-19 19:38:57 -04:00
Work-in-progress to reduce latency time:
* service->SendItem() now goes direct to pqistreamer buffer. * split p3FastService out of p3Service. p3FastService removes the recv buffer for faster processing. p3Service maintains its original interface, so derivate classes can remain unchanged. * Added uint32_t usec (wait period) to BinInterface.moretoread() & cansend() for future threading. * Added Mutex protection to pqistreamer, pqissl and derivatives of both. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6783 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
8e7fe9f79b
commit
a7dd9ad9e3
24 changed files with 713 additions and 574 deletions
|
|
@ -52,7 +52,7 @@ virtual int senddata(void *data, int len);
|
|||
virtual int readdata(void *data, int len);
|
||||
virtual int netstatus() { return 1;}
|
||||
virtual int isactive() { return (buf != NULL);}
|
||||
virtual bool moretoread()
|
||||
virtual bool moretoread(uint32_t /* usec */ )
|
||||
{
|
||||
if ((buf) && (bin_flags | BIN_FLAGS_READABLE))
|
||||
{
|
||||
|
|
@ -65,7 +65,10 @@ virtual bool moretoread()
|
|||
}
|
||||
|
||||
virtual int close();
|
||||
virtual bool cansend() { return (bin_flags | BIN_FLAGS_WRITEABLE); }
|
||||
virtual bool cansend(uint32_t /* usec */)
|
||||
{
|
||||
return (bin_flags | BIN_FLAGS_WRITEABLE);
|
||||
}
|
||||
virtual bool bandwidthLimited() { return false; }
|
||||
|
||||
//! if HASHing is switched on
|
||||
|
|
@ -118,7 +121,7 @@ public:
|
|||
int close();
|
||||
|
||||
uint64_t bytecount();
|
||||
bool moretoread();
|
||||
bool moretoread(uint32_t usec);
|
||||
|
||||
private:
|
||||
|
||||
|
|
@ -156,7 +159,7 @@ virtual int senddata(void *data, int len);
|
|||
virtual int readdata(void *data, int len);
|
||||
virtual int netstatus() { return 1; }
|
||||
virtual int isactive() { return 1; }
|
||||
virtual bool moretoread()
|
||||
virtual bool moretoread(uint32_t /* usec */)
|
||||
{
|
||||
if ((buf) && (bin_flags | BIN_FLAGS_READABLE ))
|
||||
{
|
||||
|
|
@ -169,7 +172,10 @@ virtual bool moretoread()
|
|||
}
|
||||
|
||||
virtual int close();
|
||||
virtual bool cansend() { return (bin_flags | BIN_FLAGS_WRITEABLE); }
|
||||
virtual bool cansend(uint32_t /* usec */)
|
||||
{
|
||||
return (bin_flags | BIN_FLAGS_WRITEABLE);
|
||||
}
|
||||
virtual bool bandwidthLimited() { return false; }
|
||||
|
||||
virtual std::string gethash();
|
||||
|
|
@ -217,8 +223,8 @@ virtual int senddata(void *data, int len);
|
|||
virtual int readdata(void *data, int len);
|
||||
virtual int netstatus();
|
||||
virtual int isactive();
|
||||
virtual bool moretoread();
|
||||
virtual bool cansend();
|
||||
virtual bool moretoread(uint32_t usec);
|
||||
virtual bool cansend(uint32_t usec);
|
||||
virtual int close();
|
||||
|
||||
virtual std::string gethash();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue