Start the server. This method will first bind and listen on the designated host and port. Then it will connect to num_clients clients and maintain the socket. In this process, each client shall provide their rank number.
(self)
| 89 | assert None not in self.conns |
| 90 | |
| 91 | def start(self) -> None: |
| 92 | """Start the server. |
| 93 | |
| 94 | This method will first bind and listen on the designated host and port. |
| 95 | Then it will connect to num_clients clients and maintain the socket. |
| 96 | In this process, each client shall provide their rank number. |
| 97 | """ |
| 98 | self.__start_connection() |
| 99 | self.__start_rank_pairing() |
| 100 | |
| 101 | def close(self) -> None: |
| 102 | """Close the server.""" |
no test coverage detected