|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
|
Translation changed |
|
Then we define our rate policy object. We friend the type接着定义速率策略对象。我们让类型 [link beast.ref.boost__beast__rate_policy_access `rate_policy_access`]to allow our implementation to be private, but still allow the `basic_stream` access to call the required functions. This lets us avoid having to write a cumbersome friend declaration for the `basic_stream` class template. Public members of rate policy objects become part of the stream object's interface, through a call to成为友元,这样可以将实现设为私有,同时仍然允许 `basic_stream` 访问所需函数。这种方式可以避免为 `basic_stream` 类模板编写繁琐的友元声明。速率策略对象的公有成员会通过调用 `rate_policy`.成为流对象接口的一部分。