Firstly look at player, then press "Trade" button, and request will be sent. Then, second player must do the same.
Place items, and press ready state button.
When second player will press button, after 3 seconds items will be swapped.
Too bad it's not for 1.7.10
Still really cool.