Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
CHDONE(3)		   libdill Library Functions		     CHDONE(3)

NAME
       chdone -	half-closes a channel

SYNOPSIS
	      #include <libdill.h>

	      int chdone(
		  int ch);

DESCRIPTION
       Closes an outbound half of the channel.	When the peer receives all the
       messages	sent prior to the calling chdone all its  subsequent  attempts
       to receive will fail with EPIPE error.

       ch: The channel.

RETURN VALUE
       In case of success the function returns 0.  In case of error it returns
       -1 and sets errno to one	of the values below.

ERRORS
       o EBADF:	Invalid	handle.

       o ENOTSUP: The handle does not support this operation.

       o EPIPE:	chdone was already called on this channel.

EXAMPLE
	      int ch[2];
	      chmake(ch);
	      chsend(ch, "ABC",	3, -1);
	      chdone(ch);

SEE ALSO
       chmake(3) chmake_mem(3) choose(3) chrecv(3) chsend(3)

libdill								     CHDONE(3)

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | EXAMPLE | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=chdone&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help