A simple socket implementation.