(size int)
| 592 | } |
| 593 | |
| 594 | func ioBufferPool(size int) *imem.SimpleBufferPool { |
| 595 | ioBufferMutex.Lock() |
| 596 | defer ioBufferMutex.Unlock() |
| 597 | pool, ok := ioBufferPoolMap[size] |
| 598 | if ok { |
| 599 | return pool |
| 600 | } |
| 601 | pool = imem.NewDirtySimplePool() |
| 602 | ioBufferPoolMap[size] = pool |
| 603 | return pool |
| 604 | } |
| 605 | |
| 606 | // ParseDialTarget returns the network and address to pass to dialer. |
| 607 | func ParseDialTarget(target string) (string, string) { |