mirror of
https://repo.or.cz/socat.git
synced 2025-07-19 09:22:57 +00:00
New address SOCKETPAIR for echoing datagrams
This commit is contained in:
parent
f152c55584
commit
c311542e11
18 changed files with 285 additions and 13 deletions
|
@ -114,7 +114,11 @@ ssize_t xiowrite(xiofile_t *file, const void *buff, size_t bytes) {
|
|||
#endif /* _WITH_SOCKET */
|
||||
|
||||
case XIOWRITE_PIPE:
|
||||
writt = Write(pipe->para.bipipe.fdout, buff, bytes);
|
||||
if (pipe->para.bipipe.socktype == SOCK_STREAM) {
|
||||
writt = Write(pipe->para.bipipe.fdout, buff, bytes);
|
||||
} else {
|
||||
writt = Send(pipe->para.bipipe.fdout, buff, bytes, 0);
|
||||
}
|
||||
_errno = errno;
|
||||
if (writt < 0) {
|
||||
Error4("write(%d, %p, "F_Zu"): %s",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue