Skip to content

Commit

Permalink
Merge pull request #18437 from jakesmith/HPCC-31474-dafs-refactor-ssl…
Browse files Browse the repository at this point in the history
…-read

HPCC-31474 Refactor dafilesrv handling to cope with SSL/non-blocking

Reviewed-by: Mark Kelly [email protected]
Reviewed-by: Gavin Halliday <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Apr 11, 2024
2 parents 6343778 + 3a5e979 commit a782d9a
Show file tree
Hide file tree
Showing 8 changed files with 443 additions and 649 deletions.
2 changes: 1 addition & 1 deletion fs/dafsclient/rmtclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ void CRemoteBase::connectSocket(SocketEndpoint &ep, unsigned connectTimeoutMs, u
{
unsigned remaining;
if (tm.timemon->timedout(&remaining))
throwJSocketException(JSOCKERR_connection_failed);
THROWJSOCKEXCEPTION(JSOCKERR_connection_failed);
socket.setown(ISocket::connect_timeout(ep,remaining));
}
else
Expand Down
272 changes: 93 additions & 179 deletions fs/dafsserver/dafsserver.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion roxie/udplib/udpsha.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ class CSocketSimulator : public CInterfaceOf<ISocket>
unsigned timeout) override { UNIMPLEMENTED; }
virtual void read(void* buf, size32_t size) override { UNIMPLEMENTED; }
virtual size32_t write(void const* buf, size32_t size) override { UNIMPLEMENTED; }
virtual size32_t writetms(void const* buf, size32_t size, unsigned timeoutms=WAIT_FOREVER) override { UNIMPLEMENTED; }
virtual size32_t writetms(void const* buf, size32_t minSize, size32_t size, unsigned timeoutms=WAIT_FOREVER) override { UNIMPLEMENTED; }

virtual size32_t get_max_send_size() override { UNIMPLEMENTED; }
virtual ISocket* accept(bool allowcancel=false, SocketEndpoint *peerEp = nullptr) override { UNIMPLEMENTED; }
Expand Down
9 changes: 9 additions & 0 deletions system/jlib/jdebug.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@ class CCycleTimer
{
return static_cast<unsigned>(cycle_to_millisec(elapsedCycles()));
}
inline unsigned remainingMs(unsigned timeoutMs) const
{
if (INFINITE == timeoutMs)
return INFINITE;
unsigned eMs = elapsedMs();
if (eMs >= timeoutMs)
return 0;
return timeoutMs - eMs;
}
};
inline cycle_t queryOneSecCycles() { return oneSecInCycles; }

Expand Down
Loading

0 comments on commit a782d9a

Please sign in to comment.