Sockets can now be configured via optional config function