Do you not know when you are sending the last segment of a message? Why would you have to send an empty array segment?