tcp_packet

Crates.iotcp_packet
lib.rstcp_packet
version0.1.0
sourcesrc
created_at2022-06-30 21:49:43.558218
updated_at2022-06-30 21:49:43.558218
descriptionThis crate is meant to demostrate the structure of a TCP Packet
homepage
repositoryhttps://github.com/AndrewMbugua/networking_projects/tree/main/tcp_packet
max_upload_size
id616737
size799,199
Andrew Mbugua (AndrewMbugua)

documentation

README

This program is meant to demostrate the structure of a TCP Packet

It contains 2 parts:

  1. public module[lib.rs] - defines a TCP header struct & a Format trait.

  2. main module[main.rs] - populates the structure with default zero values(0) & uses an unsafe primitive to convert the struct to bytes for transfer.

I wanted to see if I could fully utilize the standard library before depending on 3rd party crates.

Dependencies,code left in but unused are: serde, tokio & cargo-deps for future improvements.

Dependencies

More will be added overtime. Ideas:

  1. Re-convert bytes to string
  2. Encode - decode
  3. Encryption - TCP uses TLS Encryption
Commit count: 0

cargo fmt