Sender refactored to work with new sockets