ID EN
Socket

send

Python 3.11

Send data to the socket. The socket must be connected to a remote socket. The optional flags argument has the same meaning as for recv() above. Returns the number of bytes sent. Applications are responsible for checking that all data has been sent; if only some of the data was transmitted, the application needs to attempt delivery of the remaining data. For further information on this topic, consult the Socket Programming HOWTO.

Syntax

PYTHON
socket.send(bytes[, flags])

See Also

recv() Socket Programming HOWTO InterruptedError