InMessage.Header
parent
d93a81b046
commit
e0d989cba3
|
@ -43,7 +43,8 @@ const bufSize = pageSize + MaxWriteSize
|
||||||
// struct. Provides storage for messages and convenient access to their
|
// struct. Provides storage for messages and convenient access to their
|
||||||
// contents.
|
// contents.
|
||||||
type InMessage struct {
|
type InMessage struct {
|
||||||
buf [bufSize]byte
|
remaining []byte
|
||||||
|
storage [bufSize]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize with the data read by a single call to r.Read. The first call to
|
// Initialize with the data read by a single call to r.Read. The first call to
|
||||||
|
@ -56,7 +57,8 @@ func (m *InMessage) Init(r io.Reader) (err error) {
|
||||||
|
|
||||||
// Return a reference to the header read in the most recent call to Init.
|
// Return a reference to the header read in the most recent call to Init.
|
||||||
func (m *InMessage) Header() (h *fusekernel.InHeader) {
|
func (m *InMessage) Header() (h *fusekernel.InHeader) {
|
||||||
panic("TODO")
|
h = (*fusekernel.InHeader)(unsafe.Pointer(&m.storage[0]))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the number of bytes left to consume.
|
// Return the number of bytes left to consume.
|
||||||
|
|
Loading…
Reference in New Issue