added send and receive bytes status
code cleanup and sensible buf and name len