def send(self, data, flags=0): """send(data[, flags]) -> count Write data to the socket. Returns the number of bytes sent, which may be less than the full data size if the network is busy. Optional flags may be: - ZTS_MSG_PEEK - Peeks at an incoming message. - ZTS_MSG_DONTWAIT - Nonblocking I/O for this operation only. - ZTS_MSG_MORE - Sender will send more. """ err = libzt.zts_py_send(self._fd, data, flags) if err < 0: handle_error(err) return err
def send(self, data, flags=0): """Write data to the socket""" err = libzt.zts_py_send(self._fd, data, len(data), flags) if err < 0: handle_error(err) return err