(self, msg)
| 203 | return token, data.lstrip(token + "):") |
| 204 | |
| 205 | def emulated_sendall(self, msg): |
| 206 | MSGLEN = 1024 * 20 |
| 207 | |
| 208 | totalsent = 0 |
| 209 | while totalsent < MSGLEN: |
| 210 | sent = self.socket.send(msg[totalsent:]) |
| 211 | if sent == 0: |
| 212 | return |
| 213 | totalsent = totalsent + sent |
| 214 | |
| 215 | def send(self, msg): |
| 216 | self.socket.sendall(bytearray(msg, "utf-8")) |