TCP keepalived how does it work

view story

http://serverfault.com – I run on Ubuntu and i want to use TCP keepalived in order to implement hearbeat between master-slave.both servers are my impl (c++). I read this overview and did some google. i didnt understand what TCP keepalived send and i do know if connection is no longer valid when use in TCP keepalive ?. Do i need to check the revived content? (HowTos)