From 94d0607798e8c0c469f932f455c25ab0d64f9826 Mon Sep 17 00:00:00 2001 From: Gwen Lg Date: Tue, 16 Aug 2022 13:45:49 +0200 Subject: [PATCH] wip: update Architecture section in puffin_http README.md --- puffin_http/README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/puffin_http/README.md b/puffin_http/README.md index 859aa95a..50b2f448 100644 --- a/puffin_http/README.md +++ b/puffin_http/README.md @@ -18,22 +18,31 @@ Listens for incoming connections and streams them puffin profiler data. - num_clients: shared 'nb clients' - fn new() : - create channel for get frame info - - create PuffinServerImpl object to use in **puffin-server** thread - - create thread **puffin-server** for lisen for client and send frame to client + - create thread **puffin-server** with `run` as start function + puffin management work is executed in this thread. + - fn run() : + - Create en LocalExecutor to handle puffin-server async task. + - create PuffinServerConnect object to use in **ps-connect** task + - create PuffinServerSend object to use in **ps-send** task - struct Client - client_addr - packet_tx: channel sender - join_handle: **puffin-server-client** thread handle -- struct PuffinServerImpl +- struct PuffinServerConnect + - executor: - tcp_listener: tcp listener of clients - - clients: list of **Client** object + - clients: shared list of **Client** object - num_clients: shared 'nb clients' - fn accept_new_clients : - loop on *tcp_listener* - create thread *puffin-server-client* when client tried to connect - and create **Client** object to allow PuffinSever to interract with client. + +- struct PuffinServerSend + - clients: shared list of **Client** object + - num_clients: shared 'nb clients' - fn send : - send frame data by channel to clients thread