 <p>You're only calling <code>receiveBytes</code> once, so that's why you only get one answer.</p> <p>To receive the multiple individual answers you'll need to call <code>receiveBytes</code> repeatedly, and most likely implement a timeout after which you give up waiting for any more responses to be received (since you can't know apriori how many there'll be).</p>