a version of code of udpclient lib