in is always a msg when receiving, NULL otherwise