Receive data with operation code. Parameters ---------- control_frame: bool a boolean flag indicating whether to return control frame data, defaults to False Returns ------- opcode, frame.data: tuple tuple
(self, control_frame: bool = False)
| 406 | return "" |
| 407 | |
| 408 | def recv_data(self, control_frame: bool = False) -> tuple: |
| 409 | """ |
| 410 | Receive data with operation code. |
| 411 | |
| 412 | Parameters |
| 413 | ---------- |
| 414 | control_frame: bool |
| 415 | a boolean flag indicating whether to return control frame |
| 416 | data, defaults to False |
| 417 | |
| 418 | Returns |
| 419 | ------- |
| 420 | opcode, frame.data: tuple |
| 421 | tuple of operation code and string(byte array) value. |
| 422 | """ |
| 423 | opcode, frame = self.recv_data_frame(control_frame) |
| 424 | return opcode, frame.data |
| 425 | |
| 426 | def recv_data_frame(self, control_frame: bool = False) -> tuple: |
| 427 | """ |