Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
iclose_handler.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 Roc Streaming authors
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
8 
9 //! @file roc_netio/target_libuv/roc_netio/iclose_handler.h
10 //! @brief Close handler interface.
11 
12 #ifndef ROC_NETIO_ICLOSE_HANDLER_H_
13 #define ROC_NETIO_ICLOSE_HANDLER_H_
14 
15 namespace roc {
16 namespace netio {
17 
18 class BasicPort;
19 
20 //! Close handler interface.
22 public:
23  virtual ~ICloseHandler();
24 
25  //! Handle completion of asynchronous closing of given port.
26  //! @remarks
27  //! After this call, the closed port should not be used.
28  //! @note
29  //! This method os called from the network loop thread.
30  virtual void handle_close_completed(BasicPort& port, void* arg) = 0;
31 };
32 
33 } // namespace netio
34 } // namespace roc
35 
36 #endif // ROC_NETIO_ICLOSE_HANDLER_H_
Base class for ports.
Definition: basic_port.h:40
Close handler interface.
virtual void handle_close_completed(BasicPort &port, void *arg)=0
Handle completion of asynchronous closing of given port.
Root namespace.