Added half duplex support. Fixes #50.