net: partial implementation of tcp