From 611964bdf9d823b61ea3c0d330e585d6e89491ca Mon Sep 17 00:00:00 2001 From: Robert Koifman Date: Sun, 10 Sep 2023 19:02:34 +0500 Subject: [PATCH] text updated --- docs/tcp-udp/handling-tcp-connection-requests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tcp-udp/handling-tcp-connection-requests.md b/docs/tcp-udp/handling-tcp-connection-requests.md index 5aaceed..9a07064 100644 --- a/docs/tcp-udp/handling-tcp-connection-requests.md +++ b/docs/tcp-udp/handling-tcp-connection-requests.md @@ -37,7 +37,7 @@ public class TCPOptions { } ``` The two fields of TCPOptions represent the receive and send buffer sizes that will be assigned to the TCP connection at the service side; -* backlog specifies the maximum number of queued connections that are in the process of being established or have already been established but not yet accepted by the service application. The app accepts estableshed connections by the tcpAccept method, which is described below. If the queue is full, clients get the service busy exception. The value of backlog should be chosen such that it is not too small so as not to reject client requests with the service busy exception due to the randomness of requests that could actually be processed. The backlog is designed to smooth out peaks in client requests. But on the other hand, it should not be large so that client requests that cannot be processed due to a heavy load were not queued, but were rejected with the service busy exception. For most applications, 5 will be a reasonable value. +* backlog specifies the maximum number of queued connections that are in the process of being established or have already been established but not yet accepted by the service application. The app accepts estableshed connections by the tcpAccept method, which is described below. If the queue is full, clients get the service busy exception. The value of backlog should be chosen such that it is not too small so as not to reject client requests with the *Service Busy* exception due to the randomness of requests that could actually be processed. The backlog is designed to smooth out peaks in client requests. But on the other hand, it should not be large so that client requests that cannot be processed due to a heavy load were not queued, but were rejected with the service busy exception. For most applications, 5 will be a reasonable value. The next method we have to consider is tcpAccept. It provides an accept handler to the listener that was earlier bound to the virtual port. If there is an established connection queued in the backlog, the handler is called back immediately. To accept the next connection from the backlog, tcpAccept should be called again. If the backlog is empty, the handler remains idle. You can control the consumption of the host resources by calling tcpAccept only when the resources are released for clients. The following is the signature of the method: ```java