Write the given bytes or bytearray object *b* to the socket and return the number of bytes written. This can be less than len(b) if not all data could be written. If the socket is non-blocking and no bytes could be written None is returned.
(self, b)
| 741 | raise |
| 742 | |
| 743 | def write(self, b): |
| 744 | """Write the given bytes or bytearray object *b* to the socket |
| 745 | and return the number of bytes written. This can be less than |
| 746 | len(b) if not all data could be written. If the socket is |
| 747 | non-blocking and no bytes could be written None is returned. |
| 748 | """ |
| 749 | self._checkClosed() |
| 750 | self._checkWritable() |
| 751 | try: |
| 752 | return self._sock.send(b) |
| 753 | except error as e: |
| 754 | # XXX what about EINTR? |
| 755 | if e.errno in _blocking_errnos: |
| 756 | return None |
| 757 | raise |
| 758 | |
| 759 | def readable(self): |
| 760 | """True if the SocketIO is open for reading. |
nothing calls this directly
no test coverage detected