summaryrefslogtreecommitdiff
path: root/lib/tsocket/tsocket_bsd.c
AgeCommit message (Collapse)AuthorFilesLines
2009-11-03tsocket_bsd: return -1 and set errno to ENAMETOOLONG if the unix path is too ↵Stefan Metzmacher1-1/+6
long metze
2009-07-16tsocket: rename sa_len => sa_socklen, because sa_len is a macro on some ↵Stefan Metzmacher1-21/+21
platforms metze
2009-06-29tsocket/bsd: also ask for TEVENT_FD_READ when we want to write into a stream ↵Stefan Metzmacher1-2/+9
socket Otherwise we would not notice a broken connection. metze
2009-06-29tsocket/bsd: more correctly check if the cached tevent_fd is still validStefan Metzmacher1-4/+12
I some cases the pointer value of tevent_context is the same again, if we do something like: ev1 = tevent_context_init(); ... fde = tevent_add_fd(ev1, fd, TEVENT_FD_READ...); ... talloc_free(ev1); ... ev2 = tevent_context_init(); if (ev1 == ev2) { /* this can happen! */ } if (tevent_fd_get_flags(fde) == 0) { /* this is always true */ } But the "talloc_free(ev1)" will set fde->event_ctx to NULL and tevent_fd_get_flags() will always return 0. metze
2009-05-22tsocket: allow empty vectors at the end for tstream_writev()/readv()Stefan Metzmacher1-0/+26
metze
2009-05-19Set errno=ENOMEM if tevent_add_fd failsVolker Lendecke1-0/+4
tevent_add_fd does not properly set that. At least in epoll and select this is the only error condition. Metze, please check!
2009-05-19Simplify the logic of tsocket_bsd_pendingVolker Lendecke1-24/+26
Remove two indentation levels by returning early on error. Metze, please check!
2009-05-01tsocket: add tstream implementation for bsd sockets (inet and unix)Stefan Metzmacher1-0/+900
metze
2009-05-01tsocket: rename tdgram_unix_dgram_socket() => tdgram_unix_socket()Stefan Metzmacher1-5/+5
metze
2009-05-01tsocket: tdgram move input checks to the common code as there're needed for ↵Stefan Metzmacher1-22/+1
all backends We need to make sure that we free the sendto and recvfrom requests before the tdgram_context metze
2009-05-01tsocket: for unix domain sockets we need to use sizeof(struct sockaddr_un)Stefan Metzmacher1-2/+22
sizeof(struct sockaddr_storage) generates EINVAL. metze
2009-05-01tsocket: remove tsocket_context related stuffStefan Metzmacher1-674/+13
It will be replaced by tdgram_context and tstream_context. metze
2009-04-16tsocket: fix the build without ipv6 supportStefan Metzmacher1-0/+2
metze
2009-04-06tsocket: reduce size of dummy variableStefan Metzmacher1-1/+1
metze
2009-04-06tsocket: use the correct 'ret' variable for tdgram_disconnect_send/recv()Stefan Metzmacher1-8/+2
metze
2009-04-02tsocket: remove DGRAM support from tsocket_contextStefan Metzmacher1-72/+0
metze
2009-04-02tsocket: optimize tdgram_bsd a lotStefan Metzmacher1-27/+54
The desire is to do as less syscalls during the tdgram_sendto_send/recv() and tdgram_recvfrom_send/recv() operations. 1. we first try the sendto()/recvfrom() syscall and only use a fd event if we got EAGAIN. 2. we cache the fd event and only change it's flags if really needed. For the highload case we do almost no epoll_ctl() and epoll_wait()/select() syscalls anymore. This speeds up the LDAP-BENCH-CLDAP test by more than 20%. (With a modified version of this test which let the server skip any ldb calls and just return success I'm getting about 8000 requests per second, while I'm getting just about 6000 requests per second without optimization) metze
2009-04-02tsocket: split out a smaller tdgram_context abstractionStefan Metzmacher1-0/+844
The idea is to have a tdgram and a tstream abstraction which only provide tevent_req based io functions. metze
2009-03-31tsocket: try to fix the build on solaris FIONREAD was missingStefan Metzmacher1-0/+1
metze
2009-03-28tsocket: more s/sun/un to make the build on solaris happyStefan Metzmacher1-6/+6
metze
2009-03-27tsocket: try to fix the build on solaris systemsStefan Metzmacher1-18/+18
It seems that 'sun' is somewhere defined and we can use it as name for variables or struct/union members. metze
2009-03-19lib/tsocket: add an implementation for bsd style sockets.Stefan Metzmacher1-0/+1126
metze