Skip to content

Commit

Permalink
Merge pull request #9 from libp2p/feat/extract-mpool
Browse files Browse the repository at this point in the history
extract buffer pool (and simplify interface)
  • Loading branch information
Stebalien authored Sep 26, 2018
2 parents d82125c + 5854271 commit 5b7d4ee
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 396 deletions.
6 changes: 3 additions & 3 deletions chan.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package msgio
import (
"io"

mpool "github.com/libp2p/go-msgio/mpool"
pool "github.com/libp2p/go-buffer-pool"
)

// Chan is a msgio duplex channel. It is used to have a channel interface
Expand All @@ -30,8 +30,8 @@ func (s *Chan) ReadFrom(r io.Reader) {
}

// ReadFromWithPool wraps the given io.Reader with a msgio.Reader, reads all
// messages, ands sends them down the channel. Uses given Pool
func (s *Chan) ReadFromWithPool(r io.Reader, p *mpool.Pool) {
// messages, ands sends them down the channel. Uses given BufferPool.
func (s *Chan) ReadFromWithPool(r io.Reader, p *pool.BufferPool) {
s.readFrom(NewReaderWithPool(r, p))
}

Expand Down
112 changes: 0 additions & 112 deletions mpool/pool.go

This file was deleted.

256 changes: 0 additions & 256 deletions mpool/pool_test.go

This file was deleted.

Loading

0 comments on commit 5b7d4ee

Please sign in to comment.