socket class for haxe(not supports flash)