# Development Update #3 09/26/2021 This is my third update for implementing uTP in Nim for the fluffy client. It has been around 2 weeks since my last post and I am back again! Over the past two weeks, I have learned a great deal about Nim. I have gotten a chance to speak to both Kim and Konrad from the Nimbus team to help me get a better understanding of the project. Both of them have been constantly supporting me throughout my progress as well as answering all of my questions. Since my last update, I have been mainly focusing on writing the code to process each packet. Therefore, this update is primarily going to focus on receiving and responding to packets. Most of the ideas derives directly from the BEP_0029 post, as a reference ![](https://i.imgur.com/UK8XBx8.png) Source: [Bittorrent](https://www.bittorrent.org/beps/bep_0029.html#connection-setup) This image displays the current request/response flow between packets. Upon the initial startup, we first create a `UTPSocket` using `createSocket()` which contains several fields such as the state, the sequence numbers, connection_ids, etc. This state is initialized with the `ConnectionState` as uninitialized, and all other values set to 0. When the UTp Stream opens, a packet of `ST_STATE` is sent which is parsed through `decodePacket`. This allows us to read the packet header field. Next, this packet is sent to the function `handlePacket` which processes them according to the packets state. For each of the states, `ST_STATE`, `ST_DATA`, `ST_FIN`, `ST_RESET` and `ST_SYN` is all handled differently. It follows the exact implementation of the snippet above. All of this code can be viewed in my latest Pull Request [here] (https://github.com/status-im/nim-eth/pull/401) # Final Thoughts These past two weeks have been extremely insightful since I got to meet with two members of the Nimbus team. They have both been helpful in my development and learning process. Outside of development, I have been continuing to learn more about Nim as well as the provided packages from the status-im team. One of the main packages that I still need to read on is the `Chronos` package which provides asynchronous programming features. These next two weeks, I plan to continue working on processing each packet to build out the entire implementation instead of just a skeleton. In addition, I want to continue learning from the members of the Nimbus team and read more about Nim itself and the corresponding packages. * ~~Get a better understanding of BEP29~~ * ~~Get a better understanding of Nim~~ * Fully understand the discovery protocol * ~~Come up with a solution to integrate it into the network~~ * ~~Begin implementing BitTorrent’s libutp in Nim~~ * ~~Create a libutp draft on the Fluffy repo~~ * ~~Begin integrating the Nim libutp into the Fluffy repo~~ * ~~Write the initial skeleton to process packets~~ * Finish an implementation to process packets * More goals to be added…