1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-17 16:43:24 +00:00

new address options shut-null, null-eof

This commit is contained in:
Gerhard Rieger 2009-04-02 17:02:29 +02:00
parent 793763677a
commit 806bccbf94
13 changed files with 96 additions and 10 deletions

View file

@ -35,6 +35,7 @@ int xioshutdown(xiofile_t *sock, int how) {
}
switch (sock->stream.howtoshut) {
char writenull;
case XIOSHUT_NONE:
return 0;
case XIOSHUT_CLOSE:
@ -49,9 +50,16 @@ int xioshutdown(xiofile_t *sock, int how) {
sock->stream.fd, how, strerror(errno));
}
return 0;
#if _WITH_SOCKET
case XIOSHUT_NULL:
/* send an empty packet; only useful on datagram sockets? */
xiowrite(sock, &writenull, 0);
return 0;
#endif /* _WITH_SOCKET */
default: ;
}
#if WITH_OPENSSL
if ((sock->stream.dtype & XIODATA_MASK) == XIODATA_OPENSSL) {
sycSSL_shutdown (sock->stream.para.openssl.ssl);