beginning framework for reconnecting sockets