Commit Graph
11 Commits
Author SHA1 Message Date
John Starks 3eabd1969d Clean up message mode pipe handling, add test 2018-06-25 09:31:55 -07:00
John Starks ae842e48e0 pipe: Resolve race between close and connect
This change resolves the issue where Accept() returns ERROR_NO_DATA
because the client closes the connection immediately. It resolves
the race by ignoring that particular connection and waiting on a
new one.
2018-01-09 13:28:13 -08:00
Darren Stahl 3d52dc4a97 Test bug: Fix server connections not closing in TestEchoWithMessaging
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-08-04 10:24:26 -07:00
Darren Stahl 2a0317319a Adding failing tests for deadlines on pending IO
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-05-05 14:53:42 -07:00
Simon Ferquel 203d18a858 Introduces a test that does an echo using message mode named pipes
This exhibit a deadlock we see sometimes when using docker cli connected
to a daemon through a named pipe with some data in the input stream (ie:
`echo "hello" | docker run ... `)

The problem seems to be that the EOF 0-length message is collapsed with
the previous message, if the buffer associated with the named pipe is
not previously flushed

Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
2017-03-17 16:43:53 +01:00
John Starks 36f4e701c4 Add support for CloseWrite() to pipes
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.
2016-03-15 11:58:02 -07:00
John Starks 0c1e4a09ec Add tests that check for EOF on pipe close 2016-03-14 16:33:35 -07:00
John Starks 99eef7be8d Ensure DialPipe times eventually by default
Signed-off-by: John Starks <jostarks@microsoft.com>
2016-01-31 14:00:21 -08:00
John Starks 3191792462 Fix errors to better match net package
Signed-off-by: John Starks <jostarks@microsoft.com>
2016-01-31 13:47:08 -08:00
John Starks b0d265e6c2 Ensure win32PipeListener.Close() correctly aborts Listen() calls
Signed-off-by: John Starks <jostarks@microsoft.com>
2016-01-31 13:46:55 -08:00
John Starks f001f808a9 Add file and pipe Windows wrappers
This includes Reader, Writer, and Closer interfaces on top of
Windows file handles in a way that does not block the system thread
while the IO is outstanding.

This also includes net.Listener and net.Conn for named pipes.
2016-01-30 18:11:47 -08:00