Commit 794ba613 authored by Linshizhi's avatar Linshizhi

add eof to mmproto

parent ed9a740b
......@@ -120,6 +120,7 @@ void mmpPush(MMProto *mm, uint8_t *packets, int size) {
info->size = size;
listPush(mm->buffer, info);
mm->eof = true;
mm->size += size;
}
......
......@@ -22,6 +22,7 @@ typedef struct MMProto {
List *buffer;
MemMovContext context;
int size;
_Bool eof;
} MMProto;
......@@ -38,6 +39,7 @@ typedef struct MMProto {
#define mmcRemain(MMC) ((MMC)->remain)
#define mmcSetRemain(MMC, REMAIN) ((MMC)->remain = (REMAIN))
#define mmpEmpty(MM) (listSize((MM)->buffer) == 0)
#define mmpIsEOF(MM) ((MM)->eof)
/* Prototypes */
MMProto* createMMProto(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment