socket: remove compat layers that are not necessary now.