(connection: socket.socket, text: str)
| 1139 | |
| 1140 | |
| 1141 | def sendAll(connection: socket.socket, text: str) -> None: |
| 1142 | data = text.encode('utf-8', 'ignore') |
| 1143 | while data: |
| 1144 | num = connection.send(data) |
| 1145 | if num < len(data): |
| 1146 | data = data[num:] |
| 1147 | else: |
| 1148 | data = None |
| 1149 | |
| 1150 | |
| 1151 | def httpGetResponse(connection: socket.socket, data: str, contentType: str) -> None: |