Home | History | Annotate | Download | only in spdy

Lines Matching refs:iter

35 bool SpdyFrameBuilder::ReadUInt16(void** iter, uint16* result) const {
36 DCHECK(iter);
37 if (!*iter)
38 *iter = const_cast<char*>(buffer_);
40 if (!IteratorHasRoomFor(*iter, sizeof(*result)))
43 *result = ntohs(*(reinterpret_cast<uint16*>(*iter)));
45 UpdateIter(iter, sizeof(*result));
49 bool SpdyFrameBuilder::ReadUInt32(void** iter, uint32* result) const {
50 DCHECK(iter);
51 if (!*iter)
52 *iter = const_cast<char*>(buffer_);
54 if (!IteratorHasRoomFor(*iter, sizeof(*result)))
57 *result = ntohl(*(reinterpret_cast<uint32*>(*iter)));
59 UpdateIter(iter, sizeof(*result));
63 bool SpdyFrameBuilder::ReadString(void** iter, std::string* result) const {
64 DCHECK(iter);
67 if (!ReadUInt16(iter, &len))
70 if (!IteratorHasRoomFor(*iter, len))
73 char* chars = reinterpret_cast<char*>(*iter);
76 UpdateIter(iter, len);
80 bool SpdyFrameBuilder::ReadBytes(void** iter, const char** data,
82 DCHECK(iter);
85 if (!IteratorHasRoomFor(*iter, length))
88 *data = reinterpret_cast<const char*>(*iter);
90 UpdateIter(iter, length);
94 bool SpdyFrameBuilder::ReadData(void** iter, const char** data,
96 DCHECK(iter);
100 if (!ReadUInt16(iter, length))
103 return ReadBytes(iter, data, *length);