refractor api of DataGramSocket