mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-08-28 04:46:50 -04:00
36f4e701c46e5cf84d27ad6c5d6807ade4862027
This change adds support for message mode pipes and uses them to support CloseWrite() to better match TCP and UNIX sockets. Message mode pipes support writing and (optionally) reading data in message-sized chunks. This is useful for us because when in this mode a zero-sized message can be read. We use this zero-sized message to signal that no more writes will arrive. This is not standard practice in Windows, but it is a reasonable compromise.
go-winio
This repository contains utilities for efficiently performing Win32 IO operations in Go. Currently, this is focused on accessing named pipes and other file handles, and for using named pipes as a net transport.
This code relies on IO completion ports to avoid blocking IO on system threads, allowing Go to reuse the thread to schedule another goroutine. This limits support to Windows Vista and newer operating systems. This is similar to the implementation of network sockets in Go's net package.
Please see the LICENSE file for licensing information.
Thanks to natefinch for the inspiration for this library. See https://github.com/natefinch/npipe for another named pipe implementation.
Languages
Go
100%