Detect Eof for JPG images

后端 未结 3 995
我寻月下人不归
我寻月下人不归 2020-11-30 04:42

I am sending many images from my server to client in sequence continuously through TCP.Now at client,how should i detect efficiently that this is end of my one image so writ

3条回答
  •  囚心锁ツ
    2020-11-30 05:40

    A quick look at Wikipedia's JPEG article would have given you the answer:

    • bytes 0xFF, 0xD8 indicate start of image
    • bytes 0xFF, 0xD9 indicate end of image

提交回复
热议问题