Adding the ability to set keepaliveinterval and atempt socket reconnect
on exception in _send_data
Merge pull request #461 from peterkh/master

Adding the ability to set keepaliveinterval and attempt socket reconnect on exception in _send_data