sendall with specified byte encoding if data is not bytearray, bytes (maybe str). if data is bytearray or bytes, it will be passed to native sendall API directly.
(self, data)
| 79 | return result_bytes |
| 80 | |
| 81 | def sendall(self, data): |
| 82 | """sendall with specified byte encoding if data is not bytearray, bytes |
| 83 | (maybe str). if data is bytearray or bytes, it will be passed to native sendall API |
| 84 | directly.""" |
| 85 | if isinstance(data, (bytearray, bytes)): |
| 86 | return self.__s.sendall(data) |
| 87 | return self.__s.sendall(bytearray(data, self.send_bytes_encoding)) |
| 88 | |
| 89 | def __getattr__(self, name): |
| 90 | return lambda *arg, **kw: getattr(self.__s, name)(*arg, **kw) |
no outgoing calls
no test coverage detected