remote_server_connection.h 885 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include "session_impl.h"
  3. #include <util/generic/object_counter.h>
  4. namespace NBus {
  5. namespace NPrivate {
  6. class TRemoteServerConnection: public TRemoteConnection {
  7. friend struct TBusSessionImpl;
  8. friend class TRemoteServerSession;
  9. TObjectCounter<TRemoteServerConnection> ObjectCounter;
  10. public:
  11. TRemoteServerConnection(TRemoteServerSessionPtr session, ui64 id, TNetAddr addr);
  12. void Init(SOCKET socket, TInstant now);
  13. inline TRemoteServerSession* GetSession();
  14. void HandleEvent(SOCKET socket, void* cookie) override;
  15. bool NeedInterruptRead() override;
  16. void MessageSent(TArrayRef<TBusMessagePtrAndHeader> messages) override;
  17. void ReaderProcessMessageUnknownVersion(TArrayRef<const char> dataRef) override;
  18. };
  19. }
  20. }