Basic socket functionality class