r1578: the first stage of the async client rewrite.
authorAndrew Tridgell <tridge@samba.org>
Fri, 23 Jul 2004 06:40:49 +0000 (06:40 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:57:42 +0000 (12:57 -0500)
commit96bf4da3edc4d64b0f58ef520269f3b385b8da02
tree1dffcf4d459135b9c4f8b841b8450fb99881392d
parentbb906e5e9e566e7ed931436956ba8323503875f9
r1578: the first stage of the async client rewrite.

Up to now the client code has had an async API, and operated
asynchronously at the packet level, but was not truly async in that it
assumed that it could always write to the socket and when a partial
packet came in that it could block waiting for the rest of the packet.

This change makes the SMB client library full async, by adding a
separate outgoing packet queue, using non-blocking socket IO and
having a input buffer that can fill asynchonously until the full
packet has arrived.

The main complexity was in dealing with the events structure when
using the CIFS proxy backend. In that case the same events structure
needs to be used in both the client library and the main smbd server,
so that when the client library is waiting for a reply that the main
server keeps processing packets. This required some changes in the
events library code.

Next step is to make the generated rpc client code use these new
capabilities.
13 files changed:
source/client/client.c
source/include/cli_context.h
source/include/dlinklist.h
source/include/events.h
source/include/rewrite.h
source/lib/events.c
source/libcli/raw/clisocket.c
source/libcli/raw/clitransport.c
source/libcli/raw/rawrequest.c
source/ntvfs/cifs/vfs_cifs.c
source/smb_server/smb_server.c
source/torture/basic/scanner.c
source/torture/gentest.c