summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
Diffstat (limited to 'sample')
-rw-r--r--sample/clnt.rb2
-rw-r--r--sample/dualstack-fetch.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/sample/clnt.rb b/sample/clnt.rb
index 7998379aa23..4f96ca4089a 100644
--- a/sample/clnt.rb
+++ b/sample/clnt.rb
@@ -6,7 +6,7 @@ require "socket"
host=(if ARGV.length == 2; ARGV.shift; else "localhost"; end)
print("Trying ", host, " ...")
STDOUT.flush
-s = TCPsocket.open(host, ARGV.shift)
+s = TCPSocket.open(host, ARGV.shift)
print(" done\n")
print("addr: ", s.addr.join(":"), "\n")
print("peer: ", s.peeraddr.join(":"), "\n")
diff --git a/sample/dualstack-fetch.rb b/sample/dualstack-fetch.rb
index ab8d0914f2e..1897a3d8e92 100644
--- a/sample/dualstack-fetch.rb
+++ b/sample/dualstack-fetch.rb
@@ -1,7 +1,7 @@
# simple webpage fetcher
# The code demonstrates how a multi-protocol client should be written.
-# TCPsocket is using getaddrinfo() internally, so there should be no problem.
+# TCPSocket is using getaddrinfo() internally, so there should be no problem.
require "socket"
@@ -36,7 +36,7 @@ end
#STDERR.print "path=<#{path}>\n"
STDERR.print "conntecting to #{host} port #{port}\n"
-c = TCPsocket.new(host, port)
+c = TCPSocket.new(host, port)
dest = Socket.getnameinfo(c.getpeername,
Socket::NI_NUMERICHOST|Socket::NI_NUMERICSERV)
STDERR.print "conntected to #{dest[0]} port #{dest[1]}\n"