summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/socket/socket.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 4a696120e72..fab155f66d5 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -628,7 +628,7 @@ s_recvfrom_nonblock(int argc, VALUE *argv, VALUE sock, enum sock_recv_type from)
#ifdef MSG_DONTWAIT
/* MSG_DONTWAIT avoids the race condition between fcntl and recvfrom.
- It is Linux specific, though. */
+ It is not portable, though. */
flags |= MSG_DONTWAIT;
#endif
@@ -2482,7 +2482,7 @@ sock_connect(sock, addr)
* require 'socket'
* include Socket::Constants
* socket = Socket.new( AF_INET, SOCK_STREAM, 0 )
- * sockaddr = Socket.pack_sockaddr_in( 80, 'www.google.com' )
+ * sockaddr = Socket.sockaddr_in( 80, 'www.google.com' )
* begin
* socket.connect_nonblock( sockaddr )
* rescue Errno::EINPROGRESS
@@ -2841,7 +2841,7 @@ sock_recvfrom(argc, argv, sock)
* require 'socket'
* include Socket::Constants
* socket = Socket.new(AF_INET, SOCK_STREAM, 0)
- * sockaddr = Socket.pack_sockaddr_in(2200, 'localhost')
+ * sockaddr = Socket.sockaddr_in(2200, 'localhost')
* socket.bind(sockaddr)
* socket.listen(5)
* client, client_sockaddr = socket.accept
@@ -2860,7 +2860,7 @@ sock_recvfrom(argc, argv, sock)
* require 'socket'
* include Socket::Constants
* socket = Socket.new(AF_INET, SOCK_STREAM, 0)
- * sockaddr = Socket.pack_sockaddr_in(2200, 'localhost')
+ * sockaddr = Socket.sockaddr_in(2200, 'localhost')
* socket.connect(sockaddr)
* socket.puts "Watch this get cut short!"
* socket.close
@@ -2992,7 +2992,7 @@ sock_accept(sock)
* require 'socket'
* include Socket::Constants
* socket = Socket.new( AF_INET, SOCK_STREAM, 0 )
- * sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )
+ * sockaddr = Socket.sockaddr_in( 2200, 'localhost' )
* socket.bind( sockaddr )
* socket.listen( 5 )
* begin
@@ -3009,7 +3009,7 @@ sock_accept(sock)
* require 'socket'
* include Socket::Constants
* socket = Socket.new( AF_INET, SOCK_STREAM, 0 )
- * sockaddr = Socket.pack_sockaddr_in( 2200, 'localhost' )
+ * sockaddr = Socket.sockaddr_in( 2200, 'localhost' )
* socket.connect( sockaddr )
* socket.puts "Hello from script 2."
* puts "The server said, '#{socket.readline.chomp}'"