From 125ca1a11a53810ac311012352f5b0773fc2bbde Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 18 Oct 1999 09:03:16 +0000 Subject: 19991018 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/pop.rb | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'lib/net/pop.rb') diff --git a/lib/net/pop.rb b/lib/net/pop.rb index c492a4cd20..547dafbbcc 100644 --- a/lib/net/pop.rb +++ b/lib/net/pop.rb @@ -1,6 +1,6 @@ =begin -= Net module version 1.0.2 reference manual += Net module version 1.0.3 reference manual pop.rb written by Minero Aoki @@ -167,6 +167,10 @@ Object @deleted end + def uidl + @proto.uidl @num + end + end end # POP3Session @@ -219,6 +223,11 @@ Net::Command class POP3Command < Command + def initialize( sock ) + @uidl = nil + super + end + =begin @@ -323,11 +332,19 @@ Net::Command def dele( num ) - @socket.writeline( sprintf( 'DELE %s', num ) ) + @socket.writeline( 'DELE ' + num.to_s ) check_reply( SuccessCode ) end + def uidl( num ) + @socket.writeline( 'UIDL ' + num.to_s ) + rep = check_reply( SuccessCode ) + uid = rep.msg.split(' ')[1] + + uid + end + private @@ -412,7 +429,7 @@ POP3 end - unless Session::Version == '1.0.2' then + unless Session::Version == '1.0.3' then $stderr.puts "WARNING: wrong version of session.rb & pop.rb" end -- cgit v1.2.3