diff options
author | Filipe David Manana <[email protected]> | 2011-06-19 21:16:45 +0100 |
---|---|---|
committer | Filipe David Manana <[email protected]> | 2011-08-27 14:10:06 -0700 |
commit | af8938714416c0b1393a0830fdc6e8a5ab4be87c (patch) | |
tree | 52da30ed54ab3831e0e051007f0bd89047236b5d /lib/kernel/src/gen_tcp.erl | |
parent | 9a52e239698ae62cddbc0d780502c72458867b6f (diff) | |
download | otp-af8938714416c0b1393a0830fdc6e8a5ab4be87c.tar.gz otp-af8938714416c0b1393a0830fdc6e8a5ab4be87c.tar.bz2 otp-af8938714416c0b1393a0830fdc6e8a5ab4be87c.zip |
Fix type of Packet arg of gen_tcp:send/2 and gen_udp:send/4
The type is marked as a binary() or a string() but in practice it can
be an iodata(). The test suite was updated to confirm the gen_tcp/2
and gen_udp:send/4 functions accept iodata() (iolists) packets.
Diffstat (limited to 'lib/kernel/src/gen_tcp.erl')
-rw-r--r-- | lib/kernel/src/gen_tcp.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kernel/src/gen_tcp.erl b/lib/kernel/src/gen_tcp.erl index df326b59d6..8ab18c01b4 100644 --- a/lib/kernel/src/gen_tcp.erl +++ b/lib/kernel/src/gen_tcp.erl @@ -250,7 +250,7 @@ close(S) -> -spec send(Socket, Packet) -> ok | {error, Reason} when Socket :: socket(), - Packet :: string() | binary(), + Packet :: iodata(), Reason :: inet:posix(). send(S, Packet) when is_port(S) -> |