From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <29d919e67f7ef97bb8b99c2021f72957@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] 9p and how can I know when a write is finished Date: Wed, 1 Mar 2006 09:49:24 -0500 From: Sape Mullender In-Reply-To: <82c890d00603010629oe7c69ddr5ef809a598ce28eb@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 07154a7e-ead1-11e9-9d60-3106f5b1d025 > Hello, > > I'm not sure if I'm misunderstanding this but, > i need to write to a ctl file some commands, > so to parse them correctly i need the complete > command (commands file should be 10k or so, but > may be more). > > How can I know when a write is finished to start > parsing the commands? (i mean, if occurs > that the write is done with multiple requests ). > > Twrite tag[2] fid[4] offset[8] count[4] data[count] > > Is there any special mark on those fields? what is > the man page i am missing? If you're writing a file server, look at the file servers that are there to see what they look like. ramfs is a nice and simple example. If you send commands in a single write operation, they will arrive in a single write operation. read9pmsg(2) gathers just the right number of bytes for you and convM2S(2) converts the message to a C struct. Sape