Framework for mock socket