added configuration options and simple pool for sockets