mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58: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
|
@ -60,6 +60,10 @@ pqisslproxy::~pqisslproxy()
|
|||
{
|
||||
rslog(RSL_ALERT, pqisslproxyzone,
|
||||
"pqisslproxy::~pqisslproxy -> destroying pqisslproxy");
|
||||
|
||||
stoplistening();
|
||||
reset();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -455,31 +459,40 @@ int pqisslproxy::Proxy_Connection_Complete()
|
|||
|
||||
bool pqisslproxy::connect_parameter(uint32_t type, const std::string &value)
|
||||
{
|
||||
if (type == NET_PARAM_CONNECT_DOMAIN_ADDRESS)
|
||||
{
|
||||
std::string out;
|
||||
rs_sprintf(out, "pqisslproxy::connect_parameter() Peer: %s DOMAIN_ADDRESS: %s", PeerId().c_str(), value.c_str());
|
||||
rslog(RSL_WARNING, pqisslproxyzone, out);
|
||||
{
|
||||
RsStackMutex stack(mSslMtx); /**** LOCKED MUTEX ****/
|
||||
|
||||
if (type == NET_PARAM_CONNECT_DOMAIN_ADDRESS)
|
||||
{
|
||||
std::string out;
|
||||
rs_sprintf(out, "pqisslproxy::connect_parameter() Peer: %s DOMAIN_ADDRESS: %s", PeerId().c_str(), value.c_str());
|
||||
rslog(RSL_WARNING, pqisslproxyzone, out);
|
||||
|
||||
mDomainAddress = value;
|
||||
std::cerr << out << std::endl;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
mDomainAddress = value;
|
||||
std::cerr << out << std::endl;
|
||||
return true;
|
||||
}
|
||||
return pqissl::connect_parameter(type, value);
|
||||
}
|
||||
|
||||
bool pqisslproxy::connect_parameter(uint32_t type, uint32_t value)
|
||||
{
|
||||
if (type == NET_PARAM_CONNECT_REMOTE_PORT)
|
||||
{
|
||||
std::string out;
|
||||
rs_sprintf(out, "pqisslproxy::connect_parameter() Peer: %s REMOTE_PORT: %lu", PeerId().c_str(), value);
|
||||
rslog(RSL_WARNING, pqisslproxyzone, out);
|
||||
{
|
||||
RsStackMutex stack(mSslMtx); /**** LOCKED MUTEX ****/
|
||||
|
||||
mRemotePort = value;
|
||||
std::cerr << out << std::endl;
|
||||
return true;
|
||||
}
|
||||
if (type == NET_PARAM_CONNECT_REMOTE_PORT)
|
||||
{
|
||||
std::string out;
|
||||
rs_sprintf(out, "pqisslproxy::connect_parameter() Peer: %s REMOTE_PORT: %lu", PeerId().c_str(), value);
|
||||
rslog(RSL_WARNING, pqisslproxyzone, out);
|
||||
|
||||
mRemotePort = value;
|
||||
std::cerr << out << std::endl;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return pqissl::connect_parameter(type, value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue