tftp implementation in c++