basic tcp interface framework