Devlog 4:
HELLLOOO omg ive been out so long. These past couple of days ive been thinking so long about protocol design for the actual file transfer that i said im working on. GOsh it was such a long journey. 5 rejected ideas and endless staring at the whiteboard. Nevertheless, ive managed to build a file negotiation system (so that the other device can accept/reject the incoming file) that can then also transfer files later on. The reason it was so complex because well, file negotiation is completely different from normal message packets. I need to measure the file size (that can be 64-bit worth in size….which is just BIG), the file name size (which was the big issue for me) and bundle them together and send over the wire. Earlier i was thinking to make completely different packet type for such tasks, but that was seriously wrong idea as i would end up with endless conditional loops, and it looks awful. Instead what im doing is im serializing all that info and shoving it inside the body of the main packet. Then build a seperate deserializer for the file metadata so it could extract data and show it to the user. You could say i could’ve just used the existing messaging infra to transfer the info…after all they’re just strings, right? Well, true they’re just strings, but we’re handling them completely differently. For instance, we’re building a separate architecture for this so that the messaging thing remains different from the file thing. They both dont have any business to be together. That’s called modularity. And besides, i will be transferring files…i certainly couldnt do that using messaging technique and was bound to make a different protocol. SO here i am. Im so sleep deprived rn. so good night
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.