Close a channel (v5 protocol only).
(self, channel)
| 143 | self.sock.send(payload, opcode=opcode) |
| 144 | |
| 145 | def close_channel(self, channel): |
| 146 | """Close a channel (v5 protocol only).""" |
| 147 | if self.subprotocol != V5_CHANNEL_PROTOCOL: |
| 148 | return |
| 149 | data = bytes([CLOSE_CHANNEL, channel]) |
| 150 | self.sock.send(data, opcode=ABNF.OPCODE_BINARY) |
| 151 | self._closed_channels.add(channel) |
| 152 | |
| 153 | def peek_stdout(self, timeout=0): |
| 154 | """Same as peek_channel with channel=1.""" |