Can return -1 ?

hi, community!
I use MEGA2560 and W5100 to receive socket package from PC , the only two byte in package is: 0x01 0x02, but i find that will return this: 0x01 0x02 0xff 0xff 0xff 0xff…, will never return -1 even the package is ended.
What would be the best way to known there is no data from W5100 ?
Thank your time.

Reference of is:

The next byte (or character), or -1 if none is available.

0xff is -1.