[network.py] re-add messageinBuffer() function