Opened 12 years ago
Closed 9 years ago
#522 closed enhancement (worksforme)
Implement sendto() and recvfrom() for TCP
Reported by: | Martin Decky | Owned by: | Jiri Svoboda |
---|---|---|---|
Priority: | minor | Milestone: | 0.7.0 |
Component: | helenos/net/tcp | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
Although not used frequently, even SOCK_STREAM sockets can support sendto() and recvfrom() calls (with proper arguments).
Change History (6)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
The Linux man page for send(2) states:
If sendto() is used on a connection-mode (SOCK_STREAM, SOCK_SEQPACKET) socket,
the arguments dest_addr and addrlen are ignored (and the error EISCONN may be
returned when they are not NULL and 0), and the error ENOTCONN is returned when
the socket was not actually connected. Otherwise, the address of the target is
given by dest_addr with addrlen specifying its size.
Similarly, the Linux man page for recv(2) states:
The recv() call is normally used only on a connected socket (see connect(2)) and
is identical to recvfrom() with a NULL src_addr argument.
I don't consider this as a "canonical" behaviour in any sense, but I believe it cannot hurt anything.
comment:3 by , 12 years ago
For comparison, the Solaris man pages, although they seem to indicate that it is possible to use sendto() and recvfrom() on a stream socket, they don't say anything about what it actually does.
comment:4 by , 10 years ago
Milestone: | 0.5.1 → 0.5.2 |
---|
Do you have any documentation which would describe how that should behave? Or at least any ideas?