mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-14 17:00:52 +08:00
9697f95b8f
This reverts commit 15d999759e
.
33 lines
504 B
C++
33 lines
504 B
C++
#pragma once
|
|
|
|
class fiber_transfer : public acl::fiber
|
|
{
|
|
public:
|
|
fiber_transfer(acl::socket_stream& in, acl::socket_stream& out);
|
|
~fiber_transfer(void);
|
|
|
|
void set_peer(fiber_transfer& peer);
|
|
void wait(void);
|
|
|
|
acl::socket_stream& get_input(void) const
|
|
{
|
|
return in_;
|
|
}
|
|
|
|
acl::socket_stream& get_output(void) const
|
|
{
|
|
return out_;
|
|
}
|
|
|
|
protected:
|
|
// @override
|
|
void run(void);
|
|
|
|
private:
|
|
acl::fiber_tbox<int> box_;
|
|
acl::socket_stream& in_;
|
|
acl::socket_stream& out_;
|
|
fiber_transfer* peer_;
|
|
};
|
|
|