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)
| 732 | raise |
| 733 | |
| 734 | def write(self, b): |
| 735 | """Write the given bytes or bytearray object *b* to the socket |
| 736 | and return the number of bytes written. This can be less than |
| 737 | len(b) if not all data could be written. If the socket is |
| 738 | non-blocking and no bytes could be written None is returned. |
| 739 | """ |
| 740 | self._checkClosed() |
| 741 | self._checkWritable() |
| 742 | try: |
| 743 | return self._sock.send(b) |
| 744 | except error as e: |
| 745 | # XXX what about EINTR? |
| 746 | if e.errno in _blocking_errnos: |
| 747 | return None |
| 748 | raise |
| 749 | |
| 750 | def readable(self): |
| 751 | """True if the SocketIO is open for reading. |
nothing calls this directly
no test coverage detected