r3304: changed the API to lib/socket/ a little.
authorAndrew Tridgell <tridge@samba.org>
Thu, 28 Oct 2004 04:00:43 +0000 (04:00 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:04:52 +0000 (13:04 -0500)
commitc6888da1487ab301292c3d4d05d0464833f3ce57
tree35660282f621edb23885c40bfc4634489def3d6d
parent9d1e2b29ebf14beae4fc63b2cb85f4e2d1798021
r3304: changed the API to lib/socket/ a little.

The main change is to make socket_recv() take a pre-allocated buffer,
rather than allocating one itself. This allows non-blocking users of
this API to avoid a memcpy(). As a result our messaging code is now
about 10% faster, and the ncacn_ip_tcp and ncalrpc code is also
faster.

The second change was to remove the unused mem_ctx argument from
socket_send(). Having it there implied that memory could be allocated,
which meant the caller had to worry about freeing that memory (if for
example it is sending in a tight loop using the same memory
context). Removing that unused argument keeps life simpler for users.
(This used to be commit a16e4756cd68ca8aab4ffc59d4d9db0b6e44dbd1)
source4/ldap_server/ldap_server.c
source4/lib/messaging/messaging.c
source4/lib/socket/socket.c
source4/lib/socket/socket.h
source4/lib/socket/socket_ipv4.c
source4/lib/socket/socket_unix.c
source4/librpc/rpc/dcerpc_sock.c
source4/rpc_server/dcerpc_sock.c
source4/smb_server/request.c
source4/smb_server/smb_server.c