You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/NIOCore/ChannelHandler.swift
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
/// Base protocol for handlers that handle I/O events or intercept an I/O operation.
16
16
///
17
17
/// All methods are called from within the `EventLoop` that is assigned to the `Channel` itself.
18
-
//
18
+
///
19
19
/// You should _never_ implement this protocol directly. Please implement one of its sub-protocols.
20
20
publicprotocolChannelHandler:AnyObject{
21
21
/// Called when this `ChannelHandler` is added to the `ChannelPipeline`.
@@ -33,7 +33,7 @@ public protocol ChannelHandler: AnyObject {
33
33
34
34
/// Untyped `ChannelHandler` which handles outbound I/O events or intercept an outbound I/O operation.
35
35
///
36
-
/// Despite the fact that `write` is one of the methods on this `protocol`, you should avoid assuming that "outbound" events are to do with
36
+
/// Despite the fact that `write` is one of the methods on this protocol, you should avoid assuming that "outbound" events are to do with
37
37
/// writing to channel sources. Instead, "outbound" events are events that are passed *to* the channel source (e.g. a socket): that is, things you tell
38
38
/// the channel source to do. That includes `write` ("write this data to the channel source"), but it also includes `read` ("please begin attempting to read from
39
39
/// the channel source") and `bind` ("please bind the following address"), which have nothing to do with sending data.
@@ -104,7 +104,7 @@ public protocol _ChannelOutboundHandler: ChannelHandler {
104
104
/// - context: The `ChannelHandlerContext` which this `ChannelHandler` belongs to.
105
105
func read(context:ChannelHandlerContext)
106
106
107
-
/// Called to request that the `Channel` close itself down`.
107
+
/// Called to request that the `Channel` close itself down.
108
108
///
109
109
/// This should call `context.close` to forward the operation to the next `_ChannelOutboundHandler` in the `ChannelPipeline` or
110
110
/// complete the `EventLoopPromise` to let the caller know that the operation completed.
@@ -129,7 +129,7 @@ public protocol _ChannelOutboundHandler: ChannelHandler {
129
129
130
130
/// Untyped `ChannelHandler` which handles inbound I/O events.
131
131
///
132
-
/// Despite the fact that `channelRead` is one of the methods on this `protocol`, you should avoid assuming that "inbound" events are to do with
132
+
/// Despite the fact that `channelRead` is one of the methods on this protocol, you should avoid assuming that "inbound" events are to do with
133
133
/// reading from channel sources. Instead, "inbound" events are events that originate *from* the channel source (e.g. the socket): that is, events that the
134
134
/// channel source tells you about. This includes things like `channelRead` ("there is some data to read"), but it also includes things like
135
135
/// `channelWritabilityChanged` ("this source is no longer marked writable").
@@ -161,7 +161,7 @@ public protocol _ChannelInboundHandler: ChannelHandler {
161
161
/// - context: The `ChannelHandlerContext` which this `ChannelHandler` belongs to.
162
162
func channelActive(context:ChannelHandlerContext)
163
163
164
-
/// Called when the `Channel` has become inactive and is no longer able to send and receive data`.
164
+
/// Called when the `Channel` has become inactive and is no longer able to send and receive data.
165
165
///
166
166
/// This should call `context.fireChannelInactive` to forward the operation to the next `_ChannelInboundHandler` in the `ChannelPipeline` if you want to allow the next handler to also handle the event.
167
167
///
@@ -215,7 +215,7 @@ public protocol _ChannelInboundHandler: ChannelHandler {
Copy file name to clipboardExpand all lines: Sources/NIOCore/ChannelPipeline.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@
109
109
/// - 1 and 2 don't implement `ChannelOutboundHandler`, and therefore the actual evaluation order of a outbound event will be: 5, 4, and 3.
110
110
/// - If 5 implements both `ChannelInboundHandler` and `ChannelOutboundHandler`, the evaluation order of an inbound and a outbound event could be 125 and 543 respectively.
111
111
///
112
-
/// Note: Handlers may choose not to propagate messages down the pipeline immediately. For example a handler may need to wait
112
+
/// - Note: Handlers may choose not to propagate messages down the pipeline immediately. For example a handler may need to wait
113
113
/// for additional data before sending a protocol event to the next handler in the pipeline. Due to this you can't assume that later handlers
114
114
/// in the pipeline will receive the same number of events as were sent, or that events of different types will arrive in the same order.
115
115
/// For example - a user event could overtake a data event if a handler is aggregating data events before propagating but immediately
0 commit comments