From af8938714416c0b1393a0830fdc6e8a5ab4be87c Mon Sep 17 00:00:00 2001 From: Filipe David Manana Date: Sun, 19 Jun 2011 21:16:45 +0100 Subject: 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. --- lib/kernel/src/gen_tcp.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/kernel/src/gen_tcp.erl') 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) -> -- cgit v1.2.3