def + socket