socket: Few style fixes and removal of empty lines.
socket: Add const qualifiers.
socket: Removal of redundant code.
Socket: Removal of redundant code.