Add msg_try_receive
make internal function static
use int explicitly
Merge pull request #65 from mehlis/master

Add msg_try_receive