> For the complete documentation index, see [llms.txt](https://treasuremaster.gitbook.io/python-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://treasuremaster.gitbook.io/python-docs/moduli-standartnoi-biblioteki-1/setevoe-i-mezhprocessnoe-vzaimodeistvie/socket/obekty-soketov/socket.sendall.md).

# socket.sendall ()

### socket.sendall ( *bytes* \[, *flags* ] )

Отправляет данные в сокет. Сокет должен быть подключен к удаленному сокету. Необязательный аргумент ***flags*** имеет то же значение, что и для [recv ()](/python-docs/moduli-standartnoi-biblioteki-1/setevoe-i-mezhprocessnoe-vzaimodeistvie/socket/obekty-soketov/socket.recv.md) выше. В отличие от [send ()](/python-docs/moduli-standartnoi-biblioteki-1/setevoe-i-mezhprocessnoe-vzaimodeistvie/socket/obekty-soketov/socket.send.md), этот метод продолжает отправлять данные из байтов до тех пор, пока не будут отправлены все данные или не возникнет ошибка. В случае успеха возвращается `None`. При ошибке возникает исключение, и невозможно определить, сколько данных было успешно отправлено, если таковые имеются.

*Изменено в версии 3.5*: Тайм-аут сокета больше не сбрасывается при каждой успешной отправке данных. Тайм-аут сокета теперь является максимальной общей продолжительностью отправки всех данных.

*Изменено в версии 3.5*: если системный вызов прерывается и обработчик сигнала не вызывает исключения, метод теперь повторяет системный вызов вместо того, чтобы вызывать исключение InterruptedError (обоснование см. в [PEP 475](https://www.python.org/dev/peps/pep-0475/)).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://treasuremaster.gitbook.io/python-docs/moduli-standartnoi-biblioteki-1/setevoe-i-mezhprocessnoe-vzaimodeistvie/socket/obekty-soketov/socket.sendall.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
