NXT.MessageRead and write messages from the 10 message queues. This can be thought as advanced direct commands.
Interesting information concerning this can be found in Sivan Toledo's paper: Analysis of the NXT Bluetooth-Communication Protocol.
The 10 available mailboxes on the NXT brick.
Due to the master-slave relationship, slave devices may not initiate communication with their master, so they store outgoing messages in these mailboxes.
write conn box msg writes the message msg to the inbox box on the NXT. This is used to send messages to a currently running program.