some smart buffer work.
This commit is contained in:
1 parent
f35fa12902
commit
fd7a9ed860
14 files changed
+109
-142
No files matched your search
+7
-4
@@ -1,15 +1,18 @@
|
||||
#include "IMFHeader.h"
|
||||
#include "Exception.h"
|
||||
#include "Log.h"
|
||||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
|
||||
namespace coreutils {
|
||||
|
||||
IMFHeader::IMFHeader(int fd) {
|
||||
while(1) {
|
||||
headers.emplace(fd);
|
||||
char ch;
|
||||
int rc = ::read(fd, &ch, 1);
|
||||
while(ch != 'r') {
|
||||
IMFHeaderField *headerField = new IMFHeaderField(ch, fd);
|
||||
headers.add(headerField);
|
||||
}
|
||||
|
||||
rc = ::read(fd, &ch, 1);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user