diff --git a/.github/CONTRIBUTING.rst b/.github/CONTRIBUTING.rst index 4e2dbad..b03aa05 100644 --- a/.github/CONTRIBUTING.rst +++ b/.github/CONTRIBUTING.rst @@ -9,42 +9,40 @@ efforts to help improve ServSpy. Before contributing: -------------------- -1, Before you start to contribute, especially open a pull request. -Please make sure that you already opened an issue to discuss -the changes you want to make. This will help us understand -your intentions and provide feedback before you start working -on the code, tests or docs etc., or your PR may be closed -without review. In addition, please add the issue number -or the url in the description of your pull request, so we -can easily track the related issue and PR. +1. Before you start to contribute, especially before opening a pull request, + please make sure that you have already opened an issue to discuss the + changes you want to make. This will help us understand your intentions and + provide feedback before you start working on the code, tests or docs etc., + or your PR may be closed without review. In addition, please add the issue + number or the URL in the description of your pull request, so we can easily + track the related issue and PR. -2, Please make sure that you have already made a fork repository -of ServSpy. +2. Please make sure that you have already forked the ServSpy +repository. -3, After you made a fork repository, please clone it to your local: +3. After you have forked the repository, please clone it to your local machine: .. code-block:: bash git clone https://github.com//ServSpy.git cd ./ServSpy -4, If there are any new commits ahead of your fork repository, -please pull the latest changes from the original repository to -avoid the merge conflicts: +4. If there are new commits in the upstream repository that your fork +does not have, please pull the latest changes to avoid merge conflicts: .. code-block:: bash git pull origin main --rebase -5, Create a new branch for your changes -(Make sure the branch name is descriptive of the changes you are making): +5. Create a new branch for your changes + (Make sure the branch name is descriptive of the changes you are making): .. code-block:: bash git checkout -b -6, When you have made your changes, commit and push them with a clear -and descriptive commit message: +6. When you have made your changes, commit and push them with a clear + and descriptive commit message: .. code-block:: bash @@ -52,4 +50,4 @@ and descriptive commit message: git commit -m "Describe your changes here" git push origin -7, Finally, open a pull request to the original repository. +7. Finally, open a pull request to the original repository. diff --git a/docs/Network_APIs/TCP_Client_APIs.rst b/docs/Network_APIs/TCP_Client_APIs.rst index a4752fc..b0b2bdf 100644 --- a/docs/Network_APIs/TCP_Client_APIs.rst +++ b/docs/Network_APIs/TCP_Client_APIs.rst @@ -59,7 +59,7 @@ The TCP Client Setup API will initialize all the necessary parameters and resources for the TCP client. *Note: In the main class of the TCP client setup API, -we initialize the `start_TCP_client` method to setup +we initialize the `start_TCP_client` method to set up all functions which are needed in the TCP client, including connecting to the server, handling incoming messages, and managing user input.* @@ -100,10 +100,10 @@ will read user input from the console and send messages to the server until the connection is closed. *Note: There is a global variable ``self.running`` -which is turned to ``True`` after the client successfully +which is set to ``True`` after the client successfully connects to the server. The ``self.running`` variable is used to control the main receive loop, and it will be -turned to ``False`` when the client is shutting down.* +set to ``False`` when the client is shutting down.* The `connect` method will try to establish a TCP connection to the server. If a ``client_port`` is specified, the client @@ -185,7 +185,7 @@ connection and is responsible for: In `handle_server_command`, the client processes built-in commands sent by the server, such as: -- ``/client_alloc_port_range``: configures the clients manual +- ``/client_alloc_port_range``: configures the client's manual port allocation range based on server broadcast. - ``/server_file_transfer_port``: receives the file transfer port assigned by the server for an ongoing file operation. @@ -590,8 +590,8 @@ controlled (e.g., firewalls or testing). TCP Client APIs table --------------------- -In short, the table of contents of the public APIs -are as follows: +In short, the table of contents of the public APIs +is as follows: 1. The client setup APIs: - `TCP_Client_Base` diff --git a/docs/Network_APIs/TCP_Server_APIs.rst b/docs/Network_APIs/TCP_Server_APIs.rst index 42e479b..fdd0533 100644 --- a/docs/Network_APIs/TCP_Server_APIs.rst +++ b/docs/Network_APIs/TCP_Server_APIs.rst @@ -81,22 +81,20 @@ input of the server or not. After that, a main loop to accept clients will be started. *Note: there is another global variable ``self.running`` -which is turned to ``True`` after the server socket is +which is set to ``True`` after the server socket is successfully created. The ``self.running`` variable is used to control the main loop of the TCP server, and it -will be turned to ``False`` when the server is shutting down.* +will be set to ``False`` when the server is shutting down.* -The main loop of the TCP setup server function will first judge -if the number of the clients which are connected to the server -is over the max clients number or not. By the way, the max clients -number limit is defined by the args of the `TCP_Server_Base` -class, the ``self.max_clients`` variable which initialized in the -class. +The main loop of the TCP server setup function first checks whether the number +of connected clients exceeds the maximum number of clients. The maximum number +of clients is defined by the ``self.max_clients`` argument of the +`TCP_Server_Base` class, which is initialized in ``__init__``. If the number of the clients is already over the limit of the connect number, the server will send an overload message and close the connection. -But if it does not exceed the limit, the server will setup a clients -handlers function `handle_client` and the server handler function +But if it does not exceed the limit, the server will set up a client +handler function `handle_client` and the server handler function is defined as: .. code-block:: python @@ -110,12 +108,12 @@ see the :ref:`tcp-server-handling-information-api` section.* So what can the setup function do if it fails? -First, the try and except code block in the main server loop -will detect if the error is an ``OSError``. If it is, the +First, the try-except block in the main server loop checks whether the +error is an ``OSError``. If it is, the main loop will exit directly. -Secondly, if the error is from the network socket, it will first -output the error message and also stop the server by calling +Secondly, if the error is from the network socket, it first logs the error +message and also stops the server by calling the function `stop`. And the stop function has been defined as: .. code-block:: python @@ -123,8 +121,8 @@ the function `stop`. And the stop function has been defined as: def stop(self: Self) -> None: ... -For the stop tcp server function, it first set the ``self.running`` -variable to False, for stop the main loop of the server. +To stop the TCP server, it first sets the ``self.running`` +variable to False, to stop the main loop of the server. After that, it calls the `free_port` function to free the port which has been allocated. And the `free_port` has been defined as: @@ -137,9 +135,8 @@ defined as: *Note: For more details of the `free_port` function, see the :ref:`tcp-server-port-allocation-api` section.* -At the end of the operations, the TCP server will close all -of the sockets of clients which are accounted in the dictionary -variable ``self.clients`` and also close the server socket. +At the end of the operations, the TCP server closes all client sockets stored in the +``self.clients`` dictionary and also closes the server socket. *Note: The ``self.clients`` variable is a dictionary that maps client address tuples to an info dictionary. The @@ -187,7 +184,7 @@ connection is accepted and is responsible for: - broadcasting ``/client_alloc_port_range`` information to all clients depending on port allocation mode *Note: You can specify the port allocation mode in -the arguments which has been defined in the +the arguments which have been defined in the ``TCP_Server_Base`` class. The args which you can change are ``port_add_step``, ``port_range_num`` and ``is_hand_alloc_port``.* @@ -267,10 +264,9 @@ function. exclude_client: Any=None) -> None: ... -In `broadcast` function, it will send a message to all -the clients which are in the ``self.clients`` variable, -also delete the clients which are already disconnected -with the server. And if the ``exclude_client`` parameter +The `broadcast` function sends a message to all clients in the +``self.clients`` dictionary and removes clients that are already +disconnected from the server. And if the ``exclude_client`` parameter is not ``None``, the server will exclude the client which is specified by the ``exclude_client`` parameter when sending the message. @@ -282,10 +278,9 @@ when sending the message. message: Any) -> None: ... -The `send_msg_to_specific_client` function is used to send -one or more message to one or more specific clients by their -client IDs. And the ``message`` args should be input a send -message command. +The `send_msg_to_specific_client` function sends one or more messages to +one or more specific clients by their client IDs. The ``message`` argument +should contain a command message to send. These methods form the server's client I/O loop and ensure reliable message exchange for connected @@ -301,11 +296,10 @@ and a command extension API. The main entry point is the `handle_command` method, which is invoked for any message starting with ``/``. -We support two solutions for command handling, -one is input a command in the console, and -the other is receiving a command from other -clients, and you can also call the functions -which are defined for the commands in the code. +We support two solutions for command handling: +inputting a command in the console or +receiving a command from other clients. You can also call the +functions defined for each command in the code. *Note: You can select the solution which you want to use by changing the args of the @@ -357,10 +351,10 @@ are as follows: - ``handler``: The function to call when the command is received. -*Note: The ``handler`` function must have and only have three -parameters which are ``client_socket``, ``client_address``, +*Note: The ``handler`` function must have exactly three parameters: +``client_socket``, ``client_address``, and ``command``. ``client_socket`` will be accepted as the -network socket object who sent the command, ``client_address`` +network socket object that sent the command, ``client_address`` will be accepted as the address of the client that sent the command, while the ``command`` parameter will contain the actual command string.* @@ -378,7 +372,7 @@ the command will be handled when the server input the command in console. *Note: It's true that the valid values for ``where_to_run`` -are too strange, but we still didn't find a better way to +are not ideal, but we have not yet found a better way to define that.* The ways to run the command will be different @@ -389,17 +383,17 @@ server's thread pool. If ``run_in_thread`` is ``False``, the command handler will be executed synchronously in the main server thread. -*Note: We store the registered commands in a list variable -with two dictionary in its inner layer, and the list variable -is defined as ``self._custom_handlers`` which initialized in -the `__init__` method. The command and its handler will be -stored in the one of the dictionaries according to the value -of ``where_to_run``. For ``"server"``, it will be stored in -the first dictionary, otherwise in the second dictionary. -And the key of the dictionaries are all the command name, -and the value is another dictionary containing the handler +*Note: We store the registered commands in a list variable +with two dictionaries in its inner layer, and the list variable +is defined as ``self._custom_handlers`` which is initialized in +the `__init__` method. The command and its handler will be +stored in one of the dictionaries according to the value +of ``where_to_run``. For ``"server"``, it will be stored in +the first dictionary, otherwise in the second dictionary. +And the keys of the dictionaries are the command names, +and the value is another dictionary containing the handler function. And there is also another list variable defined as -``self._custom_handler_threaded`` which initialized in the +``self._custom_handler_threaded`` which is initialized in the `__init__` method, it contains all the commands that should be run in a separate thread or not.* @@ -422,7 +416,7 @@ is defined as: client_address:Any=None) -> Any: ... -In this executor function, there is a try and except code +In this executor function, there is a try-except code block to catch the error when running the command handler. If there is an error when running the command handler, the server will log the error message and also send the error @@ -454,10 +448,10 @@ for execution in a separate thread. This allows long-running or blocking command handlers to run without blocking the main server loop. -As a high level TCP network protocol, A temporary TCP server -and a client can also be created very simply. The temporary -TCP server or client can be satisfied for the functions which -need other sockets or ports for avoid to have a conflict with +In this high-level TCP network protocol, a temporary TCP server +and client can also be created very simply. The temporary +TCP server or client can be used for scenarios that need +additional sockets or ports to avoid conflicts with the main server or client loop. For example, file transfer functions. The APIs to create temporary TCP server and client are defined as: @@ -513,7 +507,7 @@ that supports both client-to-server and server-to-client transfers. It's too long to introduce all the file transfer functions, -so there are only the list of APIs for the file transfer +so there is only the list of APIs for the file transfer functions, and for more details of the file transfer functions, please visit ... @@ -570,17 +564,17 @@ different multiple clients function is defined as: message: Any) -> None|False: ... -We recommend you that if you want to use the mono-file +We recommend that if you want to use the mono-file transfer function, use the `file_transfer_server_recv_client_start_thread` function first, unless the functions which called the mono-file transfer function are already in a separate thread, then you can call the `file_transfer_server_recv_client_start` -function directly, or the file transfer functions are +function directly, or the file transfer functions may not be very stable. And for the other file transfer -functions, we don't strongly recommend you to use them in +functions, we don't recommend using them in threads, because there are already some thread control -mechanisms in the functions, so don't worry about -the concurrent performance. And if you call them in +mechanisms in the functions, so there is no need to worry about +concurrency. And if you call them in threads, there may be some unexpected errors and also unnecessary complexity. @@ -628,18 +622,18 @@ Port allocation API ------------------- The server allocation APIs allow you to allocate a new -port for another servers. There are two kinds of port +port for other servers. There are two kinds of port allocation modes. -For change the port allocation mode, you can set the -args ``is_hand_alloc_port`` in the server instance class. -When input ``False``, the server instance will choose -the automatically port allocation mode, or input ``False`` +To change the port allocation mode, you can set the +``is_hand_alloc_port`` argument on the server instance. +When set to ``False``, the server instance will choose +the automatic port allocation mode, or set to ``True`` it will choose the manual allocation mode. -We most recommend you that to use the automatically port +We strongly recommend using the automatic port allocation mode, which is the default mode of the server, -because the automatically port allocation mode is more +because the automatic port allocation mode is more simple and also more stable than the manual port allocation mode. In this mode, when calling the allocation APIs, it will return ``0``. @@ -651,10 +645,10 @@ by operating system.* The other port allocation mode is the manual port allocation mode, there is a port allocation range -for the server. Please avoid to open other servers +for the server. Please avoid opening other servers in the same host, because in the existing version, -the port allocation range will be conflicted and -some unexpected errors may be caused. +the port range may conflict and may cause +unexpected errors. The range of the port allocation is configured in the server settings. The minimum allocatable port is @@ -662,11 +656,11 @@ the server settings. The minimum allocatable port is and the maximum allocatable port is ``self.port+1+self.port_add_step*self.port_range_num``. -*Note: The ``self.port`` is the args ``port`` of the -server class. The ``self.port_add_step`` is the args -``port_add_step`` of the server class. And the -``self.port_range_num`` is the args ``port_range_num`` -of the server class also.* +*Note: The ``self.port`` is the ``port`` argument of the +server class. The ``self.port_add_step`` is the +``port_add_step`` argument. And the +``self.port_range_num`` is the ``port_range_num`` +argument.* There are some relevant methods that can be used: @@ -675,10 +669,10 @@ There are some relevant methods that can be used: def palloc(self: Self) -> int: ... -The `palloc` method allow you to get a port, for -using this function, you don't need to worry about -the port allocation mode, because an allocation mode -detector is already be wrote in this method. +The `palloc` method allows you to get a port. When +using this function, you don't need to worry about +the port allocation mode, because an allocation mode +detector is already implemented in this method. .. code-block:: python @@ -687,15 +681,15 @@ detector is already be wrote in this method. port: int) -> None|int: ... -The `pfree` method allow you to free a port, as the same -as `palloc` method, you don't need to care about the +The `pfree` method allows you to free a port. Like the +`palloc` method, you don't need to worry about the port allocation mode when using this method. And there are the main functions for you to call, and for more information about the port allocation functions, see the :ref:`tcp-server-port-allocation-api` section. -This mode is useful when you need a individual port for +This mode is useful when you need an individual port for the server or must reserve a controlled range of ports for client-file transfers by manual port allocation, such as in a testing environment or when multiple diff --git a/docs/locale/ja/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po b/docs/locale/ja/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po index cefa175..bcdcd5d 100644 --- a/docs/locale/ja/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po +++ b/docs/locale/ja/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po @@ -159,7 +159,7 @@ msgstr "TCP クライアント セットアップ API は、TCP クライアン #: ../../Network_APIs/TCP_Client_APIs.rst:61 9bfa7bb5c0434d76bbe8d6c4737684dc msgid "" "*Note: In the main class of the TCP client setup API, we initialize the " -"`start_TCP_client` method to setup all functions which are needed in the TCP" +"`start_TCP_client` method to set up all functions which are needed in the TCP" " client, including connecting to the server, handling incoming messages, and" " managing user input.*" msgstr "" @@ -225,10 +225,10 @@ msgstr "" #: ../../Network_APIs/TCP_Client_APIs.rst:102 75ead842cc7841f4bfa35149fc2bf3ab msgid "" -"*Note: There is a global variable ``self.running`` which is turned to " +"*Note: There is a global variable ``self.running`` which is set to " "``True`` after the client successfully connects to the server. The " "``self.running`` variable is used to control the main receive loop, and it " -"will be turned to ``False`` when the client is shutting down.*" +"will be set to ``False`` when the client is shutting down.*" msgstr "" "*注意: グローバル変数 ``self.running`` があります。これは、クライアントがサーバーに正常に接続した後に ``True`` " "に変わります。 ``self.running`` 変数はメインの受信ループを制御するために使用され、クライアントがシャットダウンするときに " @@ -368,7 +368,7 @@ msgstr "`handle_server_command` では、クライアントはサーバーから #: ../../Network_APIs/TCP_Client_APIs.rst:188 4af524d146654f3aa498d8e8d9b723c2 msgid "" -"``/client_alloc_port_range``: configures the clients manual port allocation " +"``/client_alloc_port_range``: configures the client's manual port allocation " "range based on server broadcast." msgstr "" "``/client_alloc_port_range``: サーバーのブロードキャストに基づいてクライアントの手動ポート割り当て範囲を設定します。" @@ -895,7 +895,7 @@ msgid "TCP Client APIs table" msgstr "TCP クライアント API テーブル" #: ../../Network_APIs/TCP_Client_APIs.rst:593 87f94971d9eb4aedabd77da2e39c5a54 -msgid "In short, the table of contents of the public APIs are as follows:" +msgid "In short, the table of contents of the public APIs is as follows:" msgstr "つまり、パブリック API の目次は次のとおりです。" #: ../../Network_APIs/TCP_Client_APIs.rst:596 3ef9e8bdf0de4dd6bf1f7fab94791ef0 diff --git a/docs/locale/ja/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po b/docs/locale/ja/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po index 215551e..2ef2575 100644 --- a/docs/locale/ja/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po +++ b/docs/locale/ja/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po @@ -182,10 +182,10 @@ msgstr "その後、クライアントを受け入れるメインループが開 #: ../../Network_APIs/TCP_Server_APIs.rst:83 9416322bf1b64db09658b78f87467976 msgid "" -"*Note: there is another global variable ``self.running`` which is turned to " +"*Note: there is another global variable ``self.running`` which is set to " "``True`` after the server socket is successfully created. The " "``self.running`` variable is used to control the main loop of the TCP " -"server, and it will be turned to ``False`` when the server is shutting " +"server, and it will be set to ``False`` when the server is shutting " "down.*" msgstr "" "*注意: 別のグローバル変数 ``self.running`` があります。これは、サーバーソケットが正常に作成された後に ``True`` " @@ -194,11 +194,11 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:89 ae36a0bbc490438694c73f02a82e9b31 msgid "" -"The main loop of the TCP setup server function will first judge if the " +"The main loop of the TCP setup server function will first checks whether the " "number of the clients which are connected to the server is over the max " "clients number or not. By the way, the max clients number limit is defined " "by the args of the `TCP_Server_Base` class, the ``self.max_clients`` " -"variable which initialized in the class." +"variable which is initialized in the class." msgstr "" "TCP " "セットアップサーバー関数のメインループでは、まずサーバーに接続されているクライアント数が最大クライアント数を超えているかどうかを判断します。ちなみに、最大クライアント数の制限は、`TCP_Server_Base`" @@ -230,7 +230,7 @@ msgstr "では、セットアップ関数の実行が失敗した場合、セッ #: ../../Network_APIs/TCP_Server_APIs.rst:113 9abaea6541664937a99ee14811cdf79c msgid "" -"First, the try and except code block in the main server loop will detect if " +"First, the try-except code block in the main server loop will detect if " "the error is an ``OSError``. If it is, the main loop will exit directly." msgstr "" "まず、メインサーバーループの try および else コードブロックは、エラーが ``OSError`` " @@ -266,7 +266,8 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:140 2d161cae990b4bd8a0e7f76f6ae54e93 msgid "" -"At the end of the operations, the TCP server will close all of the sockets " +"At the end of the operations, the TCP server closes all client sockets stored in the" +"self.clients dictionary and also closes the server socket." "of clients which are accounted in the dictionary variable ``self.clients`` " "and also close the server socket." msgstr "" @@ -435,7 +436,7 @@ msgstr "" msgid "" "In `broadcast` function, it will send a message to all the clients which are" " in the ``self.clients`` variable, also delete the clients which are already" -" disconnected with the server. And if the ``exclude_client`` parameter is " +" disconnected from the server. And if the ``exclude_client`` parameter is " "not ``None``, the server will exclude the client which is specified by the " "``exclude_client`` parameter when sending the message." msgstr "" @@ -581,7 +582,7 @@ msgstr "``handler``: コマンドを受信したときに呼び出す関数。" msgid "" "*Note: The ``handler`` function must have and only have three parameters " "which are ``client_socket``, ``client_address``, and ``command``. " -"``client_socket`` will be accepted as the network socket object who sent the" +"``client_socket`` will be accepted as the network socket object that sent the" " command, ``client_address`` will be accepted as the address of the client " "that sent the command, while the ``command`` parameter will contain the " "actual command string.*" @@ -636,7 +637,7 @@ msgstr "" msgid "" "*Note: We store the registered commands in a list variable with two " "dictionary in its inner layer, and the list variable is defined as " -"``self._custom_handlers`` which initialized in the `__init__` method. The " +"``self._custom_handlers`` which is initialized in the `__init__` method. The " "command and its handler will be stored in the one of the dictionaries " "according to the value of ``where_to_run``. For ``\"server\"``, it will be " "stored in the first dictionary, otherwise in the second dictionary. And the " @@ -662,7 +663,7 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:425 adad339fc05047dd81c3bd67171a6789 msgid "" -"In this executor function, there is a try and except code block to catch the" +"In this executor function, there is a try-except code block to catch the" " error when running the command handler. If there is an error when running " "the command handler, the server will log the error message and also send the" " error message back to the client if the command is from the client side. " @@ -704,7 +705,7 @@ msgstr "" msgid "" "As a high level TCP network protocol, A temporary TCP server and a client " "can also be created very simply. The temporary TCP server or client can be " -"satisfied for the functions which need other sockets or ports for avoid to " +"used for scenarios that functions which need other sockets or ports for avoid to " "have a conflict with the main server or client loop. For example, file " "transfer functions. The APIs to create temporary TCP server and client are " "defined as:" @@ -848,7 +849,7 @@ msgstr "異なる複数のファイルを異なる複数のクライアントに #: ../../Network_APIs/TCP_Server_APIs.rst:573 f176a36916364c9ca6dd78d8246226bc #, fuzzy msgid "" -"We recommend you that if you want to use the mono-file transfer function, " +"We recommend that if you want to use the mono-file transfer function, " "use the `file_transfer_server_recv_client_start_thread` function first, " "unless the functions which called the mono-file transfer function are " "already in a separate thread, then you can call the " @@ -856,7 +857,7 @@ msgid "" "transfer functions are may not be very stable. And for the other file " "transfer functions, we don't strongly recommend you to use them in threads, " "because there are already some thread control mechanisms in the functions, " -"so don't worry about the concurrent performance. And if you call them in " +"so don't worry about the concurrency. And if you call them in " "threads, there may be some unexpected errors and also unnecessary " "complexity." msgstr "" @@ -977,9 +978,9 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:634 c74252dd96b44f1db6b982a5b9888874 msgid "" -"For change the port allocation mode, you can set the args " +"To change the port allocation mode, you can set the args " "``is_hand_alloc_port`` in the server instance class. When input ``False``, " -"the server instance will choose the automatically port allocation mode, or " +"the server instance will choose the automatic port allocation mode, or " "input ``False`` it will choose the manual allocation mode." msgstr "" "ポート割り当てモードを変更するには、サーバーインスタンスクラスに引数 ``is_hand_alloc_port`` を設定します。 " @@ -987,9 +988,9 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:640 7aa3d163bf354e95931c7574b34fc6ba msgid "" -"We most recommend you that to use the automatically port allocation mode, " -"which is the default mode of the server, because the automatically port " -"allocation mode is more simple and also more stable than the manual port " +"We strongly recommend you that to use the automatic port allocation mode, " +"which is the default mode of the server, because the automatic port " +"allocation mode is simpler and also more stable than the manual port " "allocation mode. In this mode, when calling the allocation APIs, it will " "return ``0``." msgstr "" @@ -1009,7 +1010,7 @@ msgstr "" #, fuzzy msgid "" "The other port allocation mode is the manual port allocation mode, there is " -"a port allocation range for the server. Please avoid to open other servers " +"a port allocation range for the server. Please avoid opening other servers " "in the same host, because in the existing version, the port allocation range" " will be conflicted and some unexpected errors may be caused." msgstr "" @@ -1044,16 +1045,16 @@ msgstr "使用できる関連する方法がいくつかあります。" #: ../../Network_APIs/TCP_Server_APIs.rst:678 8e9744f779214f81affafa1f446eaca4 msgid "" -"The `palloc` method allow you to get a port, for using this function, you " +"The `palloc` method allows you to get a port, When using this function, you " "don't need to worry about the port allocation mode, because an allocation " -"mode detector is already be wrote in this method." +"mode detector is already implemented in this method." msgstr "" "`palloc` " "メソッドを使用すると、ポートを取得できます。この関数を使用する場合、割り当てモード検出器がこのメソッドにすでに書き込まれているため、ポート割り当てモードについて心配する必要はありません。" #: ../../Network_APIs/TCP_Server_APIs.rst:690 b2a5f76b877b465980d6162e869921c4 msgid "" -"The `pfree` method allow you to free a port, as the same as `palloc` method," +"The `pfree` method allows you to free a port, the same as `palloc` method," " you don't need to care about the port allocation mode when using this " "method." msgstr "" @@ -1071,7 +1072,7 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:698 385b478e6ab1489b84066e4f39e4b54a msgid "" -"This mode is useful when you need a individual port for the server or must " +"This mode is useful when you need an individual port for the server or must " "reserve a controlled range of ports for client-file transfers by manual port" " allocation, such as in a testing environment or when multiple server " "processes share the same host." diff --git a/docs/locale/ko/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po b/docs/locale/ko/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po index 83a3afe..420b9ce 100644 --- a/docs/locale/ko/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po +++ b/docs/locale/ko/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po @@ -161,7 +161,7 @@ msgstr "TCP 클라이언트 설정 API는 TCP 클라이언트에 필요한 모 #: ../../Network_APIs/TCP_Client_APIs.rst:61 9bfa7bb5c0434d76bbe8d6c4737684dc msgid "" "*Note: In the main class of the TCP client setup API, we initialize the " -"`start_TCP_client` method to setup all functions which are needed in the TCP" +"`start_TCP_client` method to set up all functions which are needed in the TCP" " client, including connecting to the server, handling incoming messages, and" " managing user input.*" msgstr "" @@ -226,10 +226,10 @@ msgstr "그 후 대화형 모드가 활성화되면 클라이언트는 연결이 #: ../../Network_APIs/TCP_Client_APIs.rst:102 75ead842cc7841f4bfa35149fc2bf3ab msgid "" -"*Note: There is a global variable ``self.running`` which is turned to " +"*Note: There is a global variable ``self.running`` which is set to " "``True`` after the client successfully connects to the server. The " "``self.running`` variable is used to control the main receive loop, and it " -"will be turned to ``False`` when the client is shutting down.*" +"will be set to ``False`` when the client is shutting down.*" msgstr "" "*참고: 클라이언트가 서버에 성공적으로 연결되면 ``True``로 바뀌는 전역 변수 ``self.running``이 있습니다. " "``self.running`` 변수는 메인 수신 루프를 제어하는 ​​데 사용되며, 클라이언트가 종료되면 ``False``로 전환됩니다.*" @@ -368,7 +368,7 @@ msgstr "`handle_server_command`에서 클라이언트는 다음과 같이 서버 #: ../../Network_APIs/TCP_Client_APIs.rst:188 4af524d146654f3aa498d8e8d9b723c2 msgid "" -"``/client_alloc_port_range``: configures the clients manual port allocation " +"``/client_alloc_port_range``: configures the client's manual port allocation " "range based on server broadcast." msgstr "" "``/client_alloc_port_range``: 서버 브로드캐스트를 기반으로 클라이언트 수동 포트 할당 범위를 구성합니다." @@ -882,7 +882,7 @@ msgid "TCP Client APIs table" msgstr "TCP 클라이언트 API 테이블" #: ../../Network_APIs/TCP_Client_APIs.rst:593 87f94971d9eb4aedabd77da2e39c5a54 -msgid "In short, the table of contents of the public APIs are as follows:" +msgid "In short, the table of contents of the public APIs is as follows:" msgstr "간단히 말해서 공개 API의 목차는 다음과 같습니다." #: ../../Network_APIs/TCP_Client_APIs.rst:596 3ef9e8bdf0de4dd6bf1f7fab94791ef0 diff --git a/docs/locale/ko/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po b/docs/locale/ko/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po index ab828cc..1982d07 100644 --- a/docs/locale/ko/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po +++ b/docs/locale/ko/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po @@ -182,10 +182,10 @@ msgstr "그 후, 클라이언트를 받아들이는 메인 루프가 시작됩 #: ../../Network_APIs/TCP_Server_APIs.rst:83 9416322bf1b64db09658b78f87467976 msgid "" -"*Note: there is another global variable ``self.running`` which is turned to " +"*Note: there is another global variable ``self.running`` which is set to " "``True`` after the server socket is successfully created. The " "``self.running`` variable is used to control the main loop of the TCP " -"server, and it will be turned to ``False`` when the server is shutting " +"server, and it will be set to ``False`` when the server is shutting " "down.*" msgstr "" "*참고: 서버 소켓이 성공적으로 생성된 후 ``True``로 바뀌는 또 다른 gloable 변수 ``self.running``이 " @@ -194,11 +194,11 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:89 ae36a0bbc490438694c73f02a82e9b31 msgid "" -"The main loop of the TCP setup server function will first judge if the " +"The main loop of the TCP setup server function will first checks whether the " "number of the clients which are connected to the server is over the max " "clients number or not. By the way, the max clients number limit is defined " "by the args of the `TCP_Server_Base` class, the ``self.max_clients`` " -"variable which initialized in the class." +"variable which is initialized in the class." msgstr "" "TCP 설정 서버 기능의 메인 루프는 먼저 서버에 연결된 클라이언트 수가 최대 클라이언트 수를 초과하는지 여부를 판단합니다. 그런데 최대" " 클라이언트 수 제한은 `TCP_Server_Base` 클래스의 인수인 클래스에서 초기화된 ``self.max_clients`` 변수에 " @@ -230,7 +230,7 @@ msgstr "그렇다면 실행이 실패한 경우 설정 기능은 무엇을 할 #: ../../Network_APIs/TCP_Server_APIs.rst:113 9abaea6541664937a99ee14811cdf79c msgid "" -"First, the try and except code block in the main server loop will detect if " +"First, the try-except code block in the main server loop will detect if " "the error is an ``OSError``. If it is, the main loop will exit directly." msgstr "" "먼저, 메인 서버 루프의 try 및 Except 코드 블록은 오류가 ``OSError``인지 감지합니다. 그렇다면 메인 루프가 직접 " @@ -265,7 +265,8 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:140 2d161cae990b4bd8a0e7f76f6ae54e93 msgid "" -"At the end of the operations, the TCP server will close all of the sockets " +"At the end of the operations, the TCP server closes all client sockets stored in the" +"self.clients dictionary and also closes the server socket." "of clients which are accounted in the dictionary variable ``self.clients`` " "and also close the server socket." msgstr "" @@ -435,7 +436,7 @@ msgstr "" msgid "" "In `broadcast` function, it will send a message to all the clients which are" " in the ``self.clients`` variable, also delete the clients which are already" -" disconnected with the server. And if the ``exclude_client`` parameter is " +" disconnected from the server. And if the ``exclude_client`` parameter is " "not ``None``, the server will exclude the client which is specified by the " "``exclude_client`` parameter when sending the message." msgstr "" @@ -576,7 +577,7 @@ msgstr "``handler``: 명령이 수신될 때 호출할 함수입니다." msgid "" "*Note: The ``handler`` function must have and only have three parameters " "which are ``client_socket``, ``client_address``, and ``command``. " -"``client_socket`` will be accepted as the network socket object who sent the" +"``client_socket`` will be accepted as the network socket object that sent the" " command, ``client_address`` will be accepted as the address of the client " "that sent the command, while the ``command`` parameter will contain the " "actual command string.*" @@ -632,7 +633,7 @@ msgstr "" msgid "" "*Note: We store the registered commands in a list variable with two " "dictionary in its inner layer, and the list variable is defined as " -"``self._custom_handlers`` which initialized in the `__init__` method. The " +"``self._custom_handlers`` which is initialized in the `__init__` method. The " "command and its handler will be stored in the one of the dictionaries " "according to the value of ``where_to_run``. For ``\"server\"``, it will be " "stored in the first dictionary, otherwise in the second dictionary. And the " @@ -657,7 +658,7 @@ msgstr "그 후 명령 핸들러는 명령 이름에 따라 호출되고 다음 #: ../../Network_APIs/TCP_Server_APIs.rst:425 adad339fc05047dd81c3bd67171a6789 msgid "" -"In this executor function, there is a try and except code block to catch the" +"In this executor function, there is a try-except code block to catch the" " error when running the command handler. If there is an error when running " "the command handler, the server will log the error message and also send the" " error message back to the client if the command is from the client side. " @@ -697,7 +698,7 @@ msgstr "" msgid "" "As a high level TCP network protocol, A temporary TCP server and a client " "can also be created very simply. The temporary TCP server or client can be " -"satisfied for the functions which need other sockets or ports for avoid to " +"used for scenarios that functions which need other sockets or ports for avoid to " "have a conflict with the main server or client loop. For example, file " "transfer functions. The APIs to create temporary TCP server and client are " "defined as:" @@ -837,7 +838,7 @@ msgstr "다양한 다중 클라이언트 기능으로의 다양한 다중 파일 #: ../../Network_APIs/TCP_Server_APIs.rst:573 f176a36916364c9ca6dd78d8246226bc #, fuzzy msgid "" -"We recommend you that if you want to use the mono-file transfer function, " +"We recommend that if you want to use the mono-file transfer function, " "use the `file_transfer_server_recv_client_start_thread` function first, " "unless the functions which called the mono-file transfer function are " "already in a separate thread, then you can call the " @@ -845,7 +846,7 @@ msgid "" "transfer functions are may not be very stable. And for the other file " "transfer functions, we don't strongly recommend you to use them in threads, " "because there are already some thread control mechanisms in the functions, " -"so don't worry about the concurrent performance. And if you call them in " +"so don't worry about the concurrency. And if you call them in " "threads, there may be some unexpected errors and also unnecessary " "complexity." msgstr "" @@ -967,9 +968,9 @@ msgstr "서버 할당 API를 사용하면 다른 서버에 새 포트를 할당 #: ../../Network_APIs/TCP_Server_APIs.rst:634 c74252dd96b44f1db6b982a5b9888874 msgid "" -"For change the port allocation mode, you can set the args " +"To change the port allocation mode, you can set the args " "``is_hand_alloc_port`` in the server instance class. When input ``False``, " -"the server instance will choose the automatically port allocation mode, or " +"the server instance will choose the automatic port allocation mode, or " "input ``False`` it will choose the manual allocation mode." msgstr "" "포트 할당 모드를 변경하려면 서버 인스턴스 클래스에서 ``is_hand_alloc_port`` 인수를 설정할 수 있습니다. " @@ -977,9 +978,9 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:640 7aa3d163bf354e95931c7574b34fc6ba msgid "" -"We most recommend you that to use the automatically port allocation mode, " -"which is the default mode of the server, because the automatically port " -"allocation mode is more simple and also more stable than the manual port " +"We strongly recommend you that to use the automatic port allocation mode, " +"which is the default mode of the server, because the automatic port " +"allocation mode is simpler and also more stable than the manual port " "allocation mode. In this mode, when calling the allocation APIs, it will " "return ``0``." msgstr "" @@ -999,7 +1000,7 @@ msgstr "" #, fuzzy msgid "" "The other port allocation mode is the manual port allocation mode, there is " -"a port allocation range for the server. Please avoid to open other servers " +"a port allocation range for the server. Please avoid opening other servers " "in the same host, because in the existing version, the port allocation range" " will be conflicted and some unexpected errors may be caused." msgstr "" @@ -1034,16 +1035,16 @@ msgstr "사용할 수 있는 몇 가지 관련 방법이 있습니다." #: ../../Network_APIs/TCP_Server_APIs.rst:678 8e9744f779214f81affafa1f446eaca4 msgid "" -"The `palloc` method allow you to get a port, for using this function, you " +"The `palloc` method allows you to get a port, When using this function, you " "don't need to worry about the port allocation mode, because an allocation " -"mode detector is already be wrote in this method." +"mode detector is already implemented in this method." msgstr "" "`palloc` 메소드를 사용하면 포트를 얻을 수 있습니다. 이 기능을 사용하기 위해 할당 모드 감지기가 이 메소드에 이미 작성되어 " "있으므로 포트 할당 모드에 대해 걱정할 필요가 없습니다." #: ../../Network_APIs/TCP_Server_APIs.rst:690 b2a5f76b877b465980d6162e869921c4 msgid "" -"The `pfree` method allow you to free a port, as the same as `palloc` method," +"The `pfree` method allows you to free a port, the same as `palloc` method," " you don't need to care about the port allocation mode when using this " "method." msgstr "" @@ -1061,7 +1062,7 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:698 385b478e6ab1489b84066e4f39e4b54a msgid "" -"This mode is useful when you need a individual port for the server or must " +"This mode is useful when you need an individual port for the server or must " "reserve a controlled range of ports for client-file transfers by manual port" " allocation, such as in a testing environment or when multiple server " "processes share the same host." diff --git a/docs/locale/ru/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po b/docs/locale/ru/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po index e15f8eb..c9fb0ec 100644 --- a/docs/locale/ru/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po +++ b/docs/locale/ru/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po @@ -178,7 +178,7 @@ msgstr "" #: ../../Network_APIs/TCP_Client_APIs.rst:61 9bfa7bb5c0434d76bbe8d6c4737684dc msgid "" "*Note: In the main class of the TCP client setup API, we initialize the " -"`start_TCP_client` method to setup all functions which are needed in the TCP" +"`start_TCP_client` method to set up all functions which are needed in the TCP" " client, including connecting to the server, handling incoming messages, and" " managing user input.*" msgstr "" @@ -254,10 +254,10 @@ msgstr "" #: ../../Network_APIs/TCP_Client_APIs.rst:102 75ead842cc7841f4bfa35149fc2bf3ab msgid "" -"*Note: There is a global variable ``self.running`` which is turned to " +"*Note: There is a global variable ``self.running`` which is set to " "``True`` after the client successfully connects to the server. The " "``self.running`` variable is used to control the main receive loop, and it " -"will be turned to ``False`` when the client is shutting down.*" +"will be set to ``False`` when the client is shutting down.*" msgstr "" "*Примечание: существует глобальная переменная self.running, которая " "принимает значение True после успешного подключения клиента к серверу. " @@ -421,7 +421,7 @@ msgstr "" #: ../../Network_APIs/TCP_Client_APIs.rst:188 4af524d146654f3aa498d8e8d9b723c2 msgid "" -"``/client_alloc_port_range``: configures the clients manual port allocation " +"``/client_alloc_port_range``: configures the client's manual port allocation " "range based on server broadcast." msgstr "" "``/client_alloc_port_range``: настраивает диапазон ручного выделения портов " @@ -1011,7 +1011,7 @@ msgid "TCP Client APIs table" msgstr "Таблица API-интерфейсов TCP-клиента" #: ../../Network_APIs/TCP_Client_APIs.rst:593 87f94971d9eb4aedabd77da2e39c5a54 -msgid "In short, the table of contents of the public APIs are as follows:" +msgid "In short, the table of contents of the public APIs is as follows:" msgstr "Вкратце, содержание общедоступных API выглядит следующим образом:" #: ../../Network_APIs/TCP_Client_APIs.rst:596 3ef9e8bdf0de4dd6bf1f7fab94791ef0 diff --git a/docs/locale/ru/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po b/docs/locale/ru/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po index baa2004..1c6f25a 100644 --- a/docs/locale/ru/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po +++ b/docs/locale/ru/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po @@ -200,10 +200,10 @@ msgstr "После этого будет запущен основной цик #: ../../Network_APIs/TCP_Server_APIs.rst:83 9416322bf1b64db09658b78f87467976 msgid "" -"*Note: there is another global variable ``self.running`` which is turned to " +"*Note: there is another global variable ``self.running`` which is set to " "``True`` after the server socket is successfully created. The " "``self.running`` variable is used to control the main loop of the TCP " -"server, and it will be turned to ``False`` when the server is shutting " +"server, and it will be set to ``False`` when the server is shutting " "down.*" msgstr "" "*Примечание: существует еще одна gloable переменная ``self.running``, " @@ -214,11 +214,11 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:89 ae36a0bbc490438694c73f02a82e9b31 msgid "" -"The main loop of the TCP setup server function will first judge if the " +"The main loop of the TCP setup server function will first checks whether the " "number of the clients which are connected to the server is over the max " "clients number or not. By the way, the max clients number limit is defined " "by the args of the `TCP_Server_Base` class, the ``self.max_clients`` " -"variable which initialized in the class." +"variable which is initialized in the class." msgstr "" "Основной цикл функции сервера настройки TCP сначала определит, превышает ли " "количество клиентов, подключенных к серверу, максимальное количество " @@ -254,7 +254,7 @@ msgstr "Так что же может сделать функция настро #: ../../Network_APIs/TCP_Server_APIs.rst:113 9abaea6541664937a99ee14811cdf79c msgid "" -"First, the try and except code block in the main server loop will detect if " +"First, the try-except code block in the main server loop will detect if " "the error is an ``OSError``. If it is, the main loop will exit directly." msgstr "" "Во-первых, блок кода try и кроме в основном цикле сервера определит, " @@ -293,7 +293,8 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:140 2d161cae990b4bd8a0e7f76f6ae54e93 msgid "" -"At the end of the operations, the TCP server will close all of the sockets " +"At the end of the operations, the TCP server closes all client sockets stored in the" +"self.clients dictionary and also closes the server socket." "of clients which are accounted in the dictionary variable ``self.clients`` " "and also close the server socket." msgstr "" @@ -489,7 +490,7 @@ msgstr "" msgid "" "In `broadcast` function, it will send a message to all the clients which are" " in the ``self.clients`` variable, also delete the clients which are already" -" disconnected with the server. And if the ``exclude_client`` parameter is " +" disconnected from the server. And if the ``exclude_client`` parameter is " "not ``None``, the server will exclude the client which is specified by the " "``exclude_client`` parameter when sending the message." msgstr "" @@ -649,7 +650,7 @@ msgstr "``handler``: функция, вызываемая при получен msgid "" "*Note: The ``handler`` function must have and only have three parameters " "which are ``client_socket``, ``client_address``, and ``command``. " -"``client_socket`` will be accepted as the network socket object who sent the" +"``client_socket`` will be accepted as the network socket object that sent the" " command, ``client_address`` will be accepted as the address of the client " "that sent the command, while the ``command`` parameter will contain the " "actual command string.*" @@ -713,7 +714,7 @@ msgstr "" msgid "" "*Note: We store the registered commands in a list variable with two " "dictionary in its inner layer, and the list variable is defined as " -"``self._custom_handlers`` which initialized in the `__init__` method. The " +"``self._custom_handlers`` which is initialized in the `__init__` method. The " "command and its handler will be stored in the one of the dictionaries " "according to the value of ``where_to_run``. For ``\"server\"``, it will be " "stored in the first dictionary, otherwise in the second dictionary. And the " @@ -745,7 +746,7 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:425 adad339fc05047dd81c3bd67171a6789 msgid "" -"In this executor function, there is a try and except code block to catch the" +"In this executor function, there is a try-except code block to catch the" " error when running the command handler. If there is an error when running " "the command handler, the server will log the error message and also send the" " error message back to the client if the command is from the client side. " @@ -792,7 +793,7 @@ msgstr "" msgid "" "As a high level TCP network protocol, A temporary TCP server and a client " "can also be created very simply. The temporary TCP server or client can be " -"satisfied for the functions which need other sockets or ports for avoid to " +"used for scenarios that functions which need other sockets or ports for avoid to " "have a conflict with the main server or client loop. For example, file " "transfer functions. The APIs to create temporary TCP server and client are " "defined as:" @@ -953,7 +954,7 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:573 f176a36916364c9ca6dd78d8246226bc #, fuzzy msgid "" -"We recommend you that if you want to use the mono-file transfer function, " +"We recommend that if you want to use the mono-file transfer function, " "use the `file_transfer_server_recv_client_start_thread` function first, " "unless the functions which called the mono-file transfer function are " "already in a separate thread, then you can call the " @@ -961,7 +962,7 @@ msgid "" "transfer functions are may not be very stable. And for the other file " "transfer functions, we don't strongly recommend you to use them in threads, " "because there are already some thread control mechanisms in the functions, " -"so don't worry about the concurrent performance. And if you call them in " +"so don't worry about the concurrency. And if you call them in " "threads, there may be some unexpected errors and also unnecessary " "complexity." msgstr "" @@ -1107,9 +1108,9 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:634 c74252dd96b44f1db6b982a5b9888874 msgid "" -"For change the port allocation mode, you can set the args " +"To change the port allocation mode, you can set the args " "``is_hand_alloc_port`` in the server instance class. When input ``False``, " -"the server instance will choose the automatically port allocation mode, or " +"the server instance will choose the automatic port allocation mode, or " "input ``False`` it will choose the manual allocation mode." msgstr "" "Чтобы изменить режим выделения портов, вы можете установить аргументы " @@ -1119,9 +1120,9 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:640 7aa3d163bf354e95931c7574b34fc6ba msgid "" -"We most recommend you that to use the automatically port allocation mode, " -"which is the default mode of the server, because the automatically port " -"allocation mode is more simple and also more stable than the manual port " +"We strongly recommend you that to use the automatic port allocation mode, " +"which is the default mode of the server, because the automatic port " +"allocation mode is simpler and also more stable than the manual port " "allocation mode. In this mode, when calling the allocation APIs, it will " "return ``0``." msgstr "" @@ -1145,7 +1146,7 @@ msgstr "" #, fuzzy msgid "" "The other port allocation mode is the manual port allocation mode, there is " -"a port allocation range for the server. Please avoid to open other servers " +"a port allocation range for the server. Please avoid opening other servers " "in the same host, because in the existing version, the port allocation range" " will be conflicted and some unexpected errors may be caused." msgstr "" @@ -1185,9 +1186,9 @@ msgstr "Можно использовать несколько соответс #: ../../Network_APIs/TCP_Server_APIs.rst:678 8e9744f779214f81affafa1f446eaca4 msgid "" -"The `palloc` method allow you to get a port, for using this function, you " +"The `palloc` method allows you to get a port, When using this function, you " "don't need to worry about the port allocation mode, because an allocation " -"mode detector is already be wrote in this method." +"mode detector is already implemented in this method." msgstr "" "Метод palloc позволяет вам получить порт. Для использования этой функции вам" " не нужно беспокоиться о режиме выделения порта, поскольку детектор режима " @@ -1195,7 +1196,7 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:690 b2a5f76b877b465980d6162e869921c4 msgid "" -"The `pfree` method allow you to free a port, as the same as `palloc` method," +"The `pfree` method allows you to free a port, the same as `palloc` method," " you don't need to care about the port allocation mode when using this " "method." msgstr "" @@ -1215,7 +1216,7 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:698 385b478e6ab1489b84066e4f39e4b54a msgid "" -"This mode is useful when you need a individual port for the server or must " +"This mode is useful when you need an individual port for the server or must " "reserve a controlled range of ports for client-file transfers by manual port" " allocation, such as in a testing environment or when multiple server " "processes share the same host." diff --git a/docs/locale/zh_CN/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po b/docs/locale/zh_CN/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po index 7ce6364..fd5fa19 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po +++ b/docs/locale/zh_CN/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po @@ -153,7 +153,7 @@ msgstr "TCP 客户端设置 API 将为 TCP 客户端初始化所有必需的参 #: ../../Network_APIs/TCP_Client_APIs.rst:61 9bfa7bb5c0434d76bbe8d6c4737684dc msgid "" "*Note: In the main class of the TCP client setup API, we initialize the " -"`start_TCP_client` method to setup all functions which are needed in the TCP" +"`start_TCP_client` method to set up all functions which are needed in the TCP" " client, including connecting to the server, handling incoming messages, and" " managing user input.*" msgstr "" @@ -212,10 +212,10 @@ msgstr "之后,如果启用了交互模式,客户端将从控制台读取用 #: ../../Network_APIs/TCP_Client_APIs.rst:102 75ead842cc7841f4bfa35149fc2bf3ab msgid "" -"*Note: There is a global variable ``self.running`` which is turned to " +"*Note: There is a global variable ``self.running`` which is set to " "``True`` after the client successfully connects to the server. The " "``self.running`` variable is used to control the main receive loop, and it " -"will be turned to ``False`` when the client is shutting down.*" +"will be set to ``False`` when the client is shutting down.*" msgstr "" "*注意:有一个全局变量“self.running”,在客户端成功连接到服务器后,该变量将变为“True”。 " "“self.running”变量用于控制主接收循环,当客户端关闭时它将变为“False”。*" @@ -341,7 +341,7 @@ msgstr "在`handle_server_command`中,客户端处理服务器发送的内置 #: ../../Network_APIs/TCP_Client_APIs.rst:188 4af524d146654f3aa498d8e8d9b723c2 msgid "" -"``/client_alloc_port_range``: configures the clients manual port allocation " +"``/client_alloc_port_range``: configures the client's manual port allocation " "range based on server broadcast." msgstr "``/client_alloc_port_range``:根据服务器广播配置客户端手动端口分配范围。" @@ -819,7 +819,7 @@ msgid "TCP Client APIs table" msgstr "TCP 客户端 API 表" #: ../../Network_APIs/TCP_Client_APIs.rst:593 87f94971d9eb4aedabd77da2e39c5a54 -msgid "In short, the table of contents of the public APIs are as follows:" +msgid "In short, the table of contents of the public APIs is as follows:" msgstr "简而言之,公共API的目录如下:" #: ../../Network_APIs/TCP_Client_APIs.rst:596 3ef9e8bdf0de4dd6bf1f7fab94791ef0 diff --git a/docs/locale/zh_CN/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po b/docs/locale/zh_CN/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po index 91fd260..d9d3a65 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po +++ b/docs/locale/zh_CN/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po @@ -174,10 +174,10 @@ msgstr "之后,将启动接受客户端的主循环。" #: ../../Network_APIs/TCP_Server_APIs.rst:83 9416322bf1b64db09658b78f87467976 msgid "" -"*Note: there is another global variable ``self.running`` which is turned to " +"*Note: there is another global variable ``self.running`` which is set to " "``True`` after the server socket is successfully created. The " "``self.running`` variable is used to control the main loop of the TCP " -"server, and it will be turned to ``False`` when the server is shutting " +"server, and it will be set to ``False`` when the server is shutting " "down.*" msgstr "" "*注意:还有另一个全局变量“self.running”,在服务器套接字成功创建后,该变量将变为“True”。 ``self.running`` " @@ -185,11 +185,11 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:89 ae36a0bbc490438694c73f02a82e9b31 msgid "" -"The main loop of the TCP setup server function will first judge if the " +"The main loop of the TCP setup server function will first checks whether the " "number of the clients which are connected to the server is over the max " "clients number or not. By the way, the max clients number limit is defined " "by the args of the `TCP_Server_Base` class, the ``self.max_clients`` " -"variable which initialized in the class." +"variable which is initialized in the class." msgstr "" "TCP建立服务器函数的主循环首先判断连接到服务器的客户端数量是否超过最大客户端数量。顺便说一句,最大客户端数量限制是由“TCP_Server_Base”类的参数定义的,即在类中初始化的“self.max_clients”变量。" @@ -218,7 +218,7 @@ msgstr "那么如果setup函数运行失败了怎么办呢?" #: ../../Network_APIs/TCP_Server_APIs.rst:113 9abaea6541664937a99ee14811cdf79c msgid "" -"First, the try and except code block in the main server loop will detect if " +"First, the try-except code block in the main server loop will detect if " "the error is an ``OSError``. If it is, the main loop will exit directly." msgstr "首先,主服务器循环中的 try 和 except 代码块将检测错误是否为“OSError”。如果是,主循环将直接退出。" @@ -248,7 +248,8 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:140 2d161cae990b4bd8a0e7f76f6ae54e93 msgid "" -"At the end of the operations, the TCP server will close all of the sockets " +"At the end of the operations, the TCP server closes all client sockets stored in the" +"self.clients dictionary and also closes the server socket." "of clients which are accounted in the dictionary variable ``self.clients`` " "and also close the server socket." msgstr "在操作结束时,TCP服务器将关闭字典变量“self.clients”中记录的所有客户端套接字,并关闭服务器套接字。" @@ -405,7 +406,7 @@ msgstr "还有一些其他函数用于向客户端批量发送消息,例如“ msgid "" "In `broadcast` function, it will send a message to all the clients which are" " in the ``self.clients`` variable, also delete the clients which are already" -" disconnected with the server. And if the ``exclude_client`` parameter is " +" disconnected from the server. And if the ``exclude_client`` parameter is " "not ``None``, the server will exclude the client which is specified by the " "``exclude_client`` parameter when sending the message." msgstr "" @@ -534,7 +535,7 @@ msgstr "``handler``:收到命令时调用的函数。" msgid "" "*Note: The ``handler`` function must have and only have three parameters " "which are ``client_socket``, ``client_address``, and ``command``. " -"``client_socket`` will be accepted as the network socket object who sent the" +"``client_socket`` will be accepted as the network socket object that sent the" " command, ``client_address`` will be accepted as the address of the client " "that sent the command, while the ``command`` parameter will contain the " "actual command string.*" @@ -584,7 +585,7 @@ msgstr "" msgid "" "*Note: We store the registered commands in a list variable with two " "dictionary in its inner layer, and the list variable is defined as " -"``self._custom_handlers`` which initialized in the `__init__` method. The " +"``self._custom_handlers`` which is initialized in the `__init__` method. The " "command and its handler will be stored in the one of the dictionaries " "according to the value of ``where_to_run``. For ``\"server\"``, it will be " "stored in the first dictionary, otherwise in the second dictionary. And the " @@ -604,7 +605,7 @@ msgstr "之后,命令处理程序将根据命令名称被调用,并由命令 #: ../../Network_APIs/TCP_Server_APIs.rst:425 adad339fc05047dd81c3bd67171a6789 msgid "" -"In this executor function, there is a try and except code block to catch the" +"In this executor function, there is a try-except code block to catch the" " error when running the command handler. If there is an error when running " "the command handler, the server will log the error message and also send the" " error message back to the client if the command is from the client side. " @@ -640,7 +641,7 @@ msgstr "" msgid "" "As a high level TCP network protocol, A temporary TCP server and a client " "can also be created very simply. The temporary TCP server or client can be " -"satisfied for the functions which need other sockets or ports for avoid to " +"used for scenarios that functions which need other sockets or ports for avoid to " "have a conflict with the main server or client loop. For example, file " "transfer functions. The APIs to create temporary TCP server and client are " "defined as:" @@ -774,7 +775,7 @@ msgstr "不同的多个文件传输到不同的多个客户端函数定义为: #: ../../Network_APIs/TCP_Server_APIs.rst:573 f176a36916364c9ca6dd78d8246226bc #, fuzzy msgid "" -"We recommend you that if you want to use the mono-file transfer function, " +"We recommend that if you want to use the mono-file transfer function, " "use the `file_transfer_server_recv_client_start_thread` function first, " "unless the functions which called the mono-file transfer function are " "already in a separate thread, then you can call the " @@ -782,7 +783,7 @@ msgid "" "transfer functions are may not be very stable. And for the other file " "transfer functions, we don't strongly recommend you to use them in threads, " "because there are already some thread control mechanisms in the functions, " -"so don't worry about the concurrent performance. And if you call them in " +"so don't worry about the concurrency. And if you call them in " "threads, there may be some unexpected errors and also unnecessary " "complexity." msgstr "" @@ -895,18 +896,18 @@ msgstr "服务器分配 API 允许您为其他服务器分配新端口。端口 #: ../../Network_APIs/TCP_Server_APIs.rst:634 c74252dd96b44f1db6b982a5b9888874 msgid "" -"For change the port allocation mode, you can set the args " +"To change the port allocation mode, you can set the args " "``is_hand_alloc_port`` in the server instance class. When input ``False``, " -"the server instance will choose the automatically port allocation mode, or " +"the server instance will choose the automatic port allocation mode, or " "input ``False`` it will choose the manual allocation mode." msgstr "" "要更改端口分配模式,您可以在服务器实例类中设置参数“is_hand_alloc_port”。当输入“False”时,服务器实例将选择自动端口分配模式,或者输入“False”时,服务器实例将选择手动分配模式。" #: ../../Network_APIs/TCP_Server_APIs.rst:640 7aa3d163bf354e95931c7574b34fc6ba msgid "" -"We most recommend you that to use the automatically port allocation mode, " -"which is the default mode of the server, because the automatically port " -"allocation mode is more simple and also more stable than the manual port " +"We strongly recommend you that to use the automatic port allocation mode, " +"which is the default mode of the server, because the automatic port " +"allocation mode is simpler and also more stable than the manual port " "allocation mode. In this mode, when calling the allocation APIs, it will " "return ``0``." msgstr "" @@ -924,7 +925,7 @@ msgstr "" #, fuzzy msgid "" "The other port allocation mode is the manual port allocation mode, there is " -"a port allocation range for the server. Please avoid to open other servers " +"a port allocation range for the server. Please avoid opening other servers " "in the same host, because in the existing version, the port allocation range" " will be conflicted and some unexpected errors may be caused." msgstr "" @@ -956,14 +957,14 @@ msgstr "有一些相关的方法可以使用:" #: ../../Network_APIs/TCP_Server_APIs.rst:678 8e9744f779214f81affafa1f446eaca4 msgid "" -"The `palloc` method allow you to get a port, for using this function, you " +"The `palloc` method allows you to get a port, When using this function, you " "don't need to worry about the port allocation mode, because an allocation " -"mode detector is already be wrote in this method." +"mode detector is already implemented in this method." msgstr "`palloc`方法允许你获取一个端口,使用这个函数,你不需要担心端口分配模式,因为这个方法中已经编写了一个分配模式检测器。" #: ../../Network_APIs/TCP_Server_APIs.rst:690 b2a5f76b877b465980d6162e869921c4 msgid "" -"The `pfree` method allow you to free a port, as the same as `palloc` method," +"The `pfree` method allows you to free a port, the same as `palloc` method," " you don't need to care about the port allocation mode when using this " "method." msgstr "`pfree` 方法允许您释放一个端口,与 `palloc` 方法相同,使用该方法时不需要关心端口分配模式。" @@ -978,7 +979,7 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:698 385b478e6ab1489b84066e4f39e4b54a msgid "" -"This mode is useful when you need a individual port for the server or must " +"This mode is useful when you need an individual port for the server or must " "reserve a controlled range of ports for client-file transfers by manual port" " allocation, such as in a testing environment or when multiple server " "processes share the same host." diff --git a/docs/locale/zh_TW/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po b/docs/locale/zh_TW/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po index 27cc3fc..3203e67 100644 --- a/docs/locale/zh_TW/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po +++ b/docs/locale/zh_TW/LC_MESSAGES/Network_APIs/TCP_Client_APIs.po @@ -153,7 +153,7 @@ msgstr "TCP 用戶端設定 API 將為 TCP 用戶端初始化所有必要的參 #: ../../Network_APIs/TCP_Client_APIs.rst:61 9bfa7bb5c0434d76bbe8d6c4737684dc msgid "" "*Note: In the main class of the TCP client setup API, we initialize the " -"`start_TCP_client` method to setup all functions which are needed in the TCP" +"`start_TCP_client` method to set up all functions which are needed in the TCP" " client, including connecting to the server, handling incoming messages, and" " managing user input.*" msgstr "" @@ -215,10 +215,10 @@ msgstr "之後,如果啟用了互動模式,用戶端將從控制台讀取使 #: ../../Network_APIs/TCP_Client_APIs.rst:102 75ead842cc7841f4bfa35149fc2bf3ab msgid "" -"*Note: There is a global variable ``self.running`` which is turned to " +"*Note: There is a global variable ``self.running`` which is set to " "``True`` after the client successfully connects to the server. The " "``self.running`` variable is used to control the main receive loop, and it " -"will be turned to ``False`` when the client is shutting down.*" +"will be set to ``False`` when the client is shutting down.*" msgstr "" "*注意:有一個全域變數“self.running”,在客戶端成功連接到伺服器後,該變數將變為“True”。 " "“self.running”變數用於控制主接收循環,當客戶端關閉時它將變為“False”。 *" @@ -344,7 +344,7 @@ msgstr "在`handle_server_command`中,客戶端處理伺服器所傳送的內 #: ../../Network_APIs/TCP_Client_APIs.rst:188 4af524d146654f3aa498d8e8d9b723c2 msgid "" -"``/client_alloc_port_range``: configures the clients manual port allocation " +"``/client_alloc_port_range``: configures the client's manual port allocation " "range based on server broadcast." msgstr "``/client_alloc_port_range``:根據伺服器廣播設定客戶端手動連接埠分配範圍。" @@ -824,7 +824,7 @@ msgid "TCP Client APIs table" msgstr "TCP 用戶端 API 表" #: ../../Network_APIs/TCP_Client_APIs.rst:593 87f94971d9eb4aedabd77da2e39c5a54 -msgid "In short, the table of contents of the public APIs are as follows:" +msgid "In short, the table of contents of the public APIs is as follows:" msgstr "簡而言之,公共API的目錄如下:" #: ../../Network_APIs/TCP_Client_APIs.rst:596 3ef9e8bdf0de4dd6bf1f7fab94791ef0 diff --git a/docs/locale/zh_TW/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po b/docs/locale/zh_TW/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po index a2e277b..0369a59 100644 --- a/docs/locale/zh_TW/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po +++ b/docs/locale/zh_TW/LC_MESSAGES/Network_APIs/TCP_Server_APIs.po @@ -175,10 +175,10 @@ msgstr "之後,將啟動接受客戶端的主循環。" #: ../../Network_APIs/TCP_Server_APIs.rst:83 9416322bf1b64db09658b78f87467976 msgid "" -"*Note: there is another global variable ``self.running`` which is turned to " +"*Note: there is another global variable ``self.running`` which is set to " "``True`` after the server socket is successfully created. The " "``self.running`` variable is used to control the main loop of the TCP " -"server, and it will be turned to ``False`` when the server is shutting " +"server, and it will be set to ``False`` when the server is shutting " "down.*" msgstr "" "*注意:還有另一個全域變數“self.running”,在伺服器套接字成功建立後,該變數將變為“True”。 ``self.running`` " @@ -186,11 +186,11 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:89 ae36a0bbc490438694c73f02a82e9b31 msgid "" -"The main loop of the TCP setup server function will first judge if the " +"The main loop of the TCP setup server function will first checks whether the " "number of the clients which are connected to the server is over the max " "clients number or not. By the way, the max clients number limit is defined " "by the args of the `TCP_Server_Base` class, the ``self.max_clients`` " -"variable which initialized in the class." +"variable which is initialized in the class." msgstr "" "TCP建立伺服器函數的主循環首先判斷連接到伺服器的客戶端數量是否超過最大客戶端數量。順便說一句,最大客戶端數量限制是由「TCP_Server_Base」類別的參數定義的,即在類別中初始化的「self.max_clients」變數。" @@ -219,7 +219,7 @@ msgstr "那如果setup函式運行失敗了怎麼辦呢?" #: ../../Network_APIs/TCP_Server_APIs.rst:113 9abaea6541664937a99ee14811cdf79c msgid "" -"First, the try and except code block in the main server loop will detect if " +"First, the try-except code block in the main server loop will detect if " "the error is an ``OSError``. If it is, the main loop will exit directly." msgstr "首先,主伺服器循環中的 try 和 except 程式碼區塊將偵測錯誤是否為「OSError」。如果是,主循環將直接退出。" @@ -249,7 +249,8 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:140 2d161cae990b4bd8a0e7f76f6ae54e93 msgid "" -"At the end of the operations, the TCP server will close all of the sockets " +"At the end of the operations, the TCP server closes all client sockets stored in the" +"self.clients dictionary and also closes the server socket." "of clients which are accounted in the dictionary variable ``self.clients`` " "and also close the server socket." msgstr "在操作結束時,TCP伺服器將關閉字典變數「self.clients」中記錄的所有客戶端套接字,並關閉伺服器套接字。" @@ -407,7 +408,7 @@ msgstr "還有一些其他函數用於向客戶端批量發送訊息,例如“ msgid "" "In `broadcast` function, it will send a message to all the clients which are" " in the ``self.clients`` variable, also delete the clients which are already" -" disconnected with the server. And if the ``exclude_client`` parameter is " +" disconnected from the server. And if the ``exclude_client`` parameter is " "not ``None``, the server will exclude the client which is specified by the " "``exclude_client`` parameter when sending the message." msgstr "" @@ -536,7 +537,7 @@ msgstr "``handler``:收到指令時呼叫的函數。" msgid "" "*Note: The ``handler`` function must have and only have three parameters " "which are ``client_socket``, ``client_address``, and ``command``. " -"``client_socket`` will be accepted as the network socket object who sent the" +"``client_socket`` will be accepted as the network socket object that sent the" " command, ``client_address`` will be accepted as the address of the client " "that sent the command, while the ``command`` parameter will contain the " "actual command string.*" @@ -586,7 +587,7 @@ msgstr "" msgid "" "*Note: We store the registered commands in a list variable with two " "dictionary in its inner layer, and the list variable is defined as " -"``self._custom_handlers`` which initialized in the `__init__` method. The " +"``self._custom_handlers`` which is initialized in the `__init__` method. The " "command and its handler will be stored in the one of the dictionaries " "according to the value of ``where_to_run``. For ``\"server\"``, it will be " "stored in the first dictionary, otherwise in the second dictionary. And the " @@ -607,7 +608,7 @@ msgstr "之後,命令處理程序將根據命令名稱被調用,並由命令 #: ../../Network_APIs/TCP_Server_APIs.rst:425 adad339fc05047dd81c3bd67171a6789 msgid "" -"In this executor function, there is a try and except code block to catch the" +"In this executor function, there is a try-except code block to catch the" " error when running the command handler. If there is an error when running " "the command handler, the server will log the error message and also send the" " error message back to the client if the command is from the client side. " @@ -643,7 +644,7 @@ msgstr "" msgid "" "As a high level TCP network protocol, A temporary TCP server and a client " "can also be created very simply. The temporary TCP server or client can be " -"satisfied for the functions which need other sockets or ports for avoid to " +"used for scenarios that functions which need other sockets or ports for avoid to " "have a conflict with the main server or client loop. For example, file " "transfer functions. The APIs to create temporary TCP server and client are " "defined as:" @@ -777,7 +778,7 @@ msgstr "不同的多個檔案傳輸到不同的多個客戶端函數定義為: #: ../../Network_APIs/TCP_Server_APIs.rst:573 f176a36916364c9ca6dd78d8246226bc #, fuzzy msgid "" -"We recommend you that if you want to use the mono-file transfer function, " +"We recommend that if you want to use the mono-file transfer function, " "use the `file_transfer_server_recv_client_start_thread` function first, " "unless the functions which called the mono-file transfer function are " "already in a separate thread, then you can call the " @@ -785,7 +786,7 @@ msgid "" "transfer functions are may not be very stable. And for the other file " "transfer functions, we don't strongly recommend you to use them in threads, " "because there are already some thread control mechanisms in the functions, " -"so don't worry about the concurrent performance. And if you call them in " +"so don't worry about the concurrency. And if you call them in " "threads, there may be some unexpected errors and also unnecessary " "complexity." msgstr "" @@ -900,18 +901,18 @@ msgstr "伺服器分配 API 允許您為其他伺服器指派新連接埠。連 #: ../../Network_APIs/TCP_Server_APIs.rst:634 c74252dd96b44f1db6b982a5b9888874 msgid "" -"For change the port allocation mode, you can set the args " +"To change the port allocation mode, you can set the args " "``is_hand_alloc_port`` in the server instance class. When input ``False``, " -"the server instance will choose the automatically port allocation mode, or " +"the server instance will choose the automatic port allocation mode, or " "input ``False`` it will choose the manual allocation mode." msgstr "" "若要變更連接埠指派模式,您可以在伺服器實例類別中設定參數「is_hand_alloc_port」。當輸入“False”時,伺服器實例將選擇自動連接埠分配模式,或輸入“False”時,伺服器實例將選擇手動分配模式。" #: ../../Network_APIs/TCP_Server_APIs.rst:640 7aa3d163bf354e95931c7574b34fc6ba msgid "" -"We most recommend you that to use the automatically port allocation mode, " -"which is the default mode of the server, because the automatically port " -"allocation mode is more simple and also more stable than the manual port " +"We strongly recommend you that to use the automatic port allocation mode, " +"which is the default mode of the server, because the automatic port " +"allocation mode is simpler and also more stable than the manual port " "allocation mode. In this mode, when calling the allocation APIs, it will " "return ``0``." msgstr "" @@ -929,7 +930,7 @@ msgstr "" #, fuzzy msgid "" "The other port allocation mode is the manual port allocation mode, there is " -"a port allocation range for the server. Please avoid to open other servers " +"a port allocation range for the server. Please avoid opening other servers " "in the same host, because in the existing version, the port allocation range" " will be conflicted and some unexpected errors may be caused." msgstr "" @@ -962,14 +963,14 @@ msgstr "有一些相關的方法可以使用:" #: ../../Network_APIs/TCP_Server_APIs.rst:678 8e9744f779214f81affafa1f446eaca4 msgid "" -"The `palloc` method allow you to get a port, for using this function, you " +"The `palloc` method allows you to get a port, When using this function, you " "don't need to worry about the port allocation mode, because an allocation " -"mode detector is already be wrote in this method." +"mode detector is already implemented in this method." msgstr "`palloc`方法允許你獲取一個端口,使用這個函數,你不需要擔心端口分配模式,因為這個方法中已經編寫了一個分配模式檢測器。" #: ../../Network_APIs/TCP_Server_APIs.rst:690 b2a5f76b877b465980d6162e869921c4 msgid "" -"The `pfree` method allow you to free a port, as the same as `palloc` method," +"The `pfree` method allows you to free a port, the same as `palloc` method," " you don't need to care about the port allocation mode when using this " "method." msgstr "`pfree` 方法允許您釋放一個端口,與 `palloc` 方法相同,使用該方法時不需要關心端口分配模式。" @@ -984,7 +985,7 @@ msgstr "" #: ../../Network_APIs/TCP_Server_APIs.rst:698 385b478e6ab1489b84066e4f39e4b54a msgid "" -"This mode is useful when you need a individual port for the server or must " +"This mode is useful when you need an individual port for the server or must " "reserve a controlled range of ports for client-file transfers by manual port" " allocation, such as in a testing environment or when multiple server " "processes share the same host." diff --git a/src/connect_tcp.py b/src/connect_tcp.py index 22a978f..f772a68 100644 --- a/src/connect_tcp.py +++ b/src/connect_tcp.py @@ -1565,7 +1565,7 @@ def connect(self): # connect to server print("waiting for server to start...") pass else: - print("outof time, unable to connect to server") + print("timeout, unable to connect to server") traceback.print_exc() return False except ConnectionRefusedError: