have some basic flow control and error control, still needs to finish FIN handshake as well as some more error control and log messages