Start of socket abstraction.