docker-archive / go-p9p

A modern, performant 9P library for Go.
Apache License 2.0
206 stars 50 forks source link

respect the msize value for read/write #27

Closed simonferquel closed 8 years ago

simonferquel commented 8 years ago

There was a typo in the msize negociation code, and for large read / writes, the msize value was not taken into account (if the size of the data to write + size of the header message > msize, we must chunk the data)

codecov-io commented 8 years ago

Current coverage is 15.52% (diff: 13.33%)

Merging #27 into master will decrease coverage by 0.43%

@@             master        #27   diff @@
==========================================
  Files            13         15     +2   
  Lines          1128       1179    +51   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            180        183     +3   
- Misses          900        948    +48   
  Partials         48         48          

Powered by Codecov. Last update 5a23906...9fd7daa

dgageot commented 8 years ago

ping @stevvooe :-)

simonferquel commented 8 years ago

Should be ready to merge. I have successfully tested it in the context of Docker for Windows / Mac. Some structural changes have been made :

This also have a change in the package signature (newly exposed NewFileReader / Writer functions and newly exposed Codec from the session - so that 9pr can be reliable)

simonferquel commented 8 years ago

This way of dealing with the problem is too much invasive prefer #29