tftp implementation in cplusplus