Постоянное соединение Http (активные) и номера портов

В дополнение к ответу coredump можно также установить эти опции в .git/config файл в Вашей рабочей копии репозитория (вручную, или использование git config команда.

Посмотрите man git-config для большего количества информации о команде и прохладных вещах можно сделать с ним.

0
задан 15 March 2014 в 20:18
2 ответа

When a client opens a HTTP connection to a web server, it allocates a local socket from the operating system, which binds the socket to some port on the originating server. This is the source port of the connection, and it can be basically anything (different OSes have limits on ports though).

The other end of the socket is connected to web server port 80 (default HTTP) or custom web server port. This port is the same for all connections to that particular web server.

Keep-alive mechanism works simply so that the client (web browser) nor server does not close the TCP connection immediately after the request has been fulfilled, keeping the connection open in case new requests need to be made.

Therefore, the same source / destination ports apply for the keepalive connection.

If there is no traffic on the connection for specified time, either end can close the TCP connection.

Next request to the server will then make a new connection, opening a new source port.

0
ответ дан 5 December 2019 в 14:15

Соединения выполняются только с обычным прослушивателем HTTP, если это то, что вы имеете в виду - это не отдельный порт прослушивания.

Что касается портов, которые он может использовать, HTTP обычно находится на порту 80, но вы можете настроить свой HTTP-сервер на любой порт, который хотите.

0
ответ дан 5 December 2019 в 14:15

Теги

Похожие вопросы