auto detect by send and recv