亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pop3prot.pas

?? 包含常用Internet協議TCP,UDP、HTTP、FTP、Telnet等
?? PAS
?? 第 1 頁 / 共 4 頁
字號:
{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Author:       Fran鏾is PIETTE
Object:       TPop3Cli class implements the POP3 protocol
              (RFC-1225, RFC-1939)
Creation:     03 october 1997
Version:      2.08
EMail:        http://users.swing.be/francois.piette  francois.piette@swing.be
              http://www.rtfm.be/fpiette             francois.piette@rtfm.be
              francois.piette@pophost.eunet.be
Support:      Use the mailing list twsocket@rtfm.be See website for details.
Legal issues: Copyright (C) 1997-2000 by Fran鏾is PIETTE
              Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56
              <francois.piette@pophost.eunet.be>

              This software is provided 'as-is', without any express or
              implied warranty.  In no event will the author be held liable
              for any  damages arising from the use of this software.

              Permission is granted to anyone to use this software for any
              purpose, including commercial applications, and to alter it
              and redistribute it freely, subject to the following
              restrictions:

              1. The origin of this software must not be misrepresented,
                 you must not claim that you wrote the original software.
                 If you use this software in a product, an acknowledgment
                 in the product documentation would be appreciated but is
                 not required.

              2. Altered source versions must be plainly marked as such, and
                 must not be misrepresented as being the original software.

              3. This notice may not be removed or altered from any source
                 distribution.

              4. You must register this software by sending a picture postcard
                 to the author. Use a nice stamp and mention your name, street
                 address, EMail address and any comment you like to say.

Updates:
Sept 09, 1997 Modified TOP to be able to request 0 lines (bug reported by
              damien@jetman.demon.co.uk)
Oct 10, 1997  V1.10. Published ProtocolState property, made TOP command
              complies with RFC-1939 as suggested by damien@jetman.demon.co.uk
              Implemented the UIDL command.
Oct 11, 1997  V1.11 Implemented the APOP command, but not tested because no
              server available to test it.
              Made internal error message look like POP3 error messages (-ERR)
Oct 28, 1997  V1.12 Modified TWSocket to handle line buffer overflow and
              TPop3Client to handle that in GetMultiLine.
Jan 10, 1998  V1.13 Made FWSocket accessible with a read only property. This
              eases DNSLookup without a supplementary TWSocket.
              Added a Port property.
Apr 01, 1998  V1.14 Adapted for BCB V3
May 05, 1998  V1.15 Changed GetMultiLine to correctly handle double dots at
              line start.
Jun 01, 1998  V1.16 Ben Robinson <zeppelin@wwa.com> found that Last did'nt
              update MsgNum and MsgSize.
Aug 05, 1998  V2.00 New asynchronous version.
Sep 19, 1998  V2.01 Corrected WSocketDataAvailable to count for the added
              nul byte at the end of buffer.
Nov 28, 1998  V2.02 Corrected exception triggered using highlevel function
              when connection or DNS lookup failed (for example using Open).
Dec 03, 1998  V2.03 Added SetErrorMessage in WSocketSessionConnected.
Dec 22, 1998  V2.04 Handle exception when connecting (will be triggered when
              an invalid port has been given).
Feb 27, 1999  V2.05 Adde State property.
Mar 07, 1999  V2.06 Made public property Connected.
Aug 20, 1999  V2.07 Revised conditional compilation, adapted for BCB4, set
              compile options same as TWSocket.
Dec 26, 1999  V2.08 Makes OnRequestDone properly called after a QUIT command.
              Special thanks to roger.morton@dial.pipex.com for his work
              about that problem.

 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
unit Pop3Prot;

interface

{$B-}           { Enable partial boolean evaluation   }
{$T-}           { Untyped pointers                    }
{$X+}           { Enable extended syntax              }
{$IFNDEF VER80} { Not for Delphi 1                    }
    {$H+}       { Use long strings                    }
    {$J+}       { Allow typed constant to be modified }
{$ENDIF}
{$IFDEF VER110} { C++ Builder V3.0                    }
    {$ObjExportAll On}
{$ENDIF}
{$IFDEF VER125} { C++ Builder V4.0                    }
    {$ObjExportAll On}
{$ENDIF}

uses
    WinTypes, WinProcs, SysUtils, Messages, Classes, Graphics, Controls,
    Forms, Dialogs, Menus, WSocket, WinSock, MD5;

const
    Pop3CliVersion     = 208;
    CopyRight : String = ' POP3 component (c) 1997-2000 F. Piette V2.08 ';
{$IFDEF VER80}
    { Delphi 1 has a 255 characters string limitation }
    POP3_RCV_BUF_SIZE = 255;
{$ELSE}
    POP3_RCV_BUF_SIZE = 4096;
{$ENDIF}
    WM_POP3_REQUEST_DONE = WM_USER + 1;

type
    Pop3Exception = class(Exception);
    TPop3Display  = procedure(Sender: TObject; Msg : String) of object;
    TPop3ProtocolState  = (pop3Disconnected,  pop3WaitingUser,
                           pop3WaitingPass,   pop3Transaction);
    TPop3State    = (pop3Ready,         pop3DnsLookup,       pop3Connecting,
                     pop3Connected,     pop3InternalReady,
                     pop3WaitingBanner, pop3WaitingResponse, pop3Abort);
    TPop3Request  = (pop3Connect, pop3User, pop3Pass, pop3RPop, pop3Quit,
                     pop3Stat,    pop3List, pop3Retr, pop3Top,  pop3Dele,
                     pop3Noop,    pop3Last, pop3RSet, pop3Uidl, pop3APop,
                     pop3Open,    pop3Custom);
    TPop3Fct      = (pop3FctNone,   pop3FctConnect, pop3FctUser, pop3FctPass,
                     pop3FctRPop,   pop3FctQuit,    pop3FctAPop, pop3FctStat,
                     pop3FctList, pop3FctUidl, pop3FctRetr, pop3FctTop,
                     pop3FctDele, pop3FctNoop, pop3FctRSet, pop3FctLast);
    TPop3FctSet   = set of TPop3Fct;
    TPop3NextProc = procedure of object;
    TPop3RequestDone        = procedure(Sender  : TObject;
                                        RqType    : TPop3Request;
                                        Error     : Word) of object;
    TPop3Method   = function : boolean of object;
    TCustomPop3Cli = class(TComponent)
    private
        FWSocket            : TWSocket;
        FWindowHandle       : HWND;
        FState              : TPop3State;
        FNextProtocolState  : TPop3ProtocolState;
        FProtocolState      : TPop3ProtocolState;
        FConnected          : Boolean;
        FRequestType        : TPop3Request;
        FRequestDoneFlag    : Boolean;
        FReceiveLen         : Integer;
        FRequestResult      : Integer;
        FStatusCode         : Integer;
        FReceiveBuffer      : array [0..POP3_RCV_BUF_SIZE - 1] of char;
        FNext               : TPop3NextProc;
        FWhenConnected      : TPop3NextProc;
        FFctSet             : TPop3FctSet;
        FFctPrv             : TPop3Fct;
        FHighLevelResult    : Integer;
        FHighLevelFlag      : Boolean;
        FNextRequest        : TPop3NextProc;
        FLastResponseSave   : String;
        FStatusCodeSave     : Integer;
        FRestartFlag        : Boolean;
        FDoneAsync          : TPop3NextProc;
        FMultiLineLine      : TNotifyEvent;
        FMultiLineEnd       : TNotifyEvent;
        FMultiLineProcess   : TNotifyEvent;
        FHost           : String;
        FPort           : String;
        FUserName       : String;
        FPassWord       : String;
        FLastResponse   : String;
        FErrorMessage   : String;
        FTimeStamp      : String;
        FMsgCount       : Integer;
        FMsgSize        : Integer;
        FMsgNum         : Integer;
        FMsgUidl        : String;
        FMsgLines       : Integer;
        FTag            : LongInt;
        FWaitingOnQuit  : Boolean;

        FOnDisplay      : TPop3Display;
        FOnMessageBegin : TNotifyEvent;
        FOnMessageEnd   : TNotifyEvent;
        FOnMessageLine  : TNotifyEvent;
        FOnListBegin    : TNotifyEvent;
        FOnListEnd      : TNotifyEvent;
        FOnListLine     : TNotifyEvent;
        FOnUidlBegin    : TNotifyEvent;
        FOnUidlEnd      : TNotifyEvent;
        FOnUidlLine     : TNotifyEvent;
        FOnStateChange      : TNotifyEvent;
        FOnRequestDone      : TPop3RequestDone;
        FOnResponse         : TPop3Display;
        FOnSessionConnected : TSessionConnected;
        FOnSessionClosed    : TSessionClosed;
    protected
        procedure   ExecAsync(RqType      : TPop3Request;
                              Cmd         : String;
                              NextState   : TPop3ProtocolState;
                              DoneAsync   : TPop3NextProc);
        procedure   NextExecAsync;
        procedure   StartTransaction(OpCode      : String;
                                     Params      : String;
                                     RqType      : TPop3Request;
                                     NextState   : TPop3ProtocolState;
                                     DoneTrans   : TPop3NextProc);
        procedure   StartMultiLine(aOnBegin : TNotifyEvent;
                                   aOnLine  : TNotifyEvent;
                                   aOnEnd   : TNotifyEvent;
                                   aProcess : TNotifyEvent);
        procedure   GetALine;
        procedure   StatDone;
        procedure   ListAllDone;
        procedure   ListSingleDone;
        procedure   UidlAllDone;
        procedure   UidlSingleDone;
        procedure   RetrDone;
        procedure   LastDone;
        procedure   WndProc(var MsgRec: TMessage); virtual;
        procedure   WMPop3RequestDone(var msg: TMessage);
                        message WM_POP3_REQUEST_DONE;
        procedure   WSocketDnsLookupDone(Sender: TObject; Error: Word);
        procedure   WSocketSessionConnected(Sender: TObject; Error: Word);
        procedure   WSocketDataAvailable(Sender: TObject; Error: Word);
        procedure   WSocketSessionClosed(Sender : TObject; Error : WORD);
        procedure   DisplayLastResponse;
        procedure   TriggerDisplay(Msg : String);
        procedure   TriggerSessionConnected(Error : Word); virtual;
        procedure   TriggerSessionClosed(Error : Word);
        procedure   TriggerResponse(Msg : String); virtual;
        procedure   TriggerStateChange; virtual;
        procedure   TriggerRequestDone(Error: Word); virtual;
        function    OkResponse : Boolean;
        procedure   StateChange(NewState : TPop3State);
        procedure   Notification(AComponent: TComponent; Operation: TOperation); override;
        procedure   ClearErrorMessage;
        procedure   SetErrorMessage;
        procedure   Display(Msg : String);
        procedure   SendCommand(Cmd : String);
        function    ExtractNumbers(var N1 : Integer; var N2 : Integer) : Boolean;
        function    ExtractUidl(var N1 : Integer; var N2 : String) : Boolean;
        procedure   ProcessUidl(Sender : TObject);
        procedure   ProcessList(Sender : TObject);
        procedure   CheckReady;
        procedure   DoHighLevelAsync;
    public
        constructor Create(AOwner : TComponent); override;
        destructor  Destroy; override;
        procedure   Connect; virtual;
        procedure   Open; virtual;
        procedure   User; virtual;
        procedure   Pass; virtual;
        procedure   RPop; virtual;
        procedure   APop; virtual;
        procedure   Quit; virtual;
        procedure   Stat; virtual;
        procedure   List; virtual;
        procedure   Retr; virtual;
        procedure   Top;  virtual;
        procedure   Dele; virtual;
        procedure   Noop; virtual;
        procedure   Last; virtual;
        procedure   RSet; virtual;
        procedure   Uidl; virtual;
        procedure   Abort; virtual;
        procedure   HighLevelAsync(RqType : TPop3Request; Fcts : TPop3FctSet);

        property WSocket : TWSocket                  read  FWSocket;
        property Host : String                       read  FHost
                                                     write FHost;
        property Port : String                       read  FPort
                                                     write FPort;
        property UserName : String                   read  FUserName
                                                     write FUserName;
        property PassWord : String                   read  FPassWord
                                                     write FPassWord;
        property ErrorMessage  : String              read  FErrorMessage;
        property LastResponse  : String              read  FLastResponse;
        property State         : TPop3State          read  FState;
        property Connected     : Boolean             read  FConnected;
        property ProtocolState : TPop3ProtocolState  read  FProtocolState;
        {:Updated by the Stat method with the number of
          messages in the maildrop }
        property MsgCount : Integer                  read  FMsgCount;
        {:Updated by the Stat method with the total size
          in byte for the messages in the maildrop }
        property MsgSize : Integer                   read  FMsgSize;
        {:This is the number of lines to display in the TOP command
          Set to zero if you wants the default value }
        property MsgLines : Integer                  read  FMsgLines
                                                     write FMsgLines;
        {:This is the message number which must be returned by the Retr
          method. It is also updated by the Last method }
        property MsgNum : Integer                    read  FMsgNum
                                                     write FMsgNum;
        property MsgUidl : String                    read  FMsgUidl;
        property Tag : LongInt                       read  FTag
                                                     write FTag;
        property Handle  : HWND                      read  FWindowHandle;

        property OnDisplay : TPop3Display            read  FOnDisplay
                                                     write FOnDisplay;
        property OnMessageBegin : TNotifyEvent       read  FOnMessageBegin
                                                     write FOnMessageBegin;
        property OnMessageEnd : TNotifyEvent         read  FOnMessageEnd
                                                     write FOnMessageEnd;
        property OnMessageLine : TNotifyEvent        read  FOnMessageLine
                                                     write FOnMessageLine;
        property OnListBegin : TNotifyEvent          read  FOnListBegin
                                                     write FOnListBegin;
        property OnListEnd : TNotifyEvent            read  FOnListEnd
                                                     write FOnListEnd;
        property OnListLine : TNotifyEvent           read  FOnListLine
                                                     write FOnListLine;
        property OnUidlBegin : TNotifyEvent          read  FOnUidlBegin
                                                     write FOnUidlBegin;
        property OnUidlEnd : TNotifyEvent            read  FOnUidlEnd
                                                     write FOnUidlEnd;
        property OnUidlLine : TNotifyEvent           read  FOnUidlLine
                                                     write FOnUidlLine;
        property OnStateChange : TNotifyEvent        read  FOnStateChange
                                                     write FOnStateChange;
        property OnRequestDone : TPop3RequestDone    read  FOnRequestDone
                                                     write FOnRequestDone;
        property OnResponse: TPop3Display            read  FOnResponse
                                                     write FOnResponse;
        property OnSessionConnected : TSessionConnected
                                                     read  FOnSessionConnected
                                                     write FOnSessionConnected;
        property OnSessionClosed : TSessionClosed
                                                     read  FOnSessionClosed
                                                     write FOnSessionClosed;
    end;

    TPop3Cli = class(TCustomPop3Cli)
    published
        property Host;
        property Port;
        property UserName;
        property PassWord;
        property ErrorMessage;
        property LastResponse;
        property ProtocolState;
        property MsgCount;
        property MsgSize;
        property MsgLines;
        property MsgNum;
        property MsgUidl;
        property Tag;
        property OnDisplay;
        property OnMessageBegin;
        property OnMessageEnd;
        property OnMessageLine;
        property OnListBegin;
        property OnListEnd;
        property OnListLine;
        property OnUidlBegin;
        property OnUidlEnd;
        property OnUidlLine;
        property OnStateChange;
        property OnRequestDone;
        property OnResponse;
        property OnSessionConnected;
        property OnSessionClosed;
    end;

    { TSyncPop3Cli add synchronous functions. You should avoid using this   }
    { component because synchronous function, apart from being easy, result }
    { in lower performance programs.                                        }
    TSyncPop3Cli = class(TPop3Cli)
    protected
        FTimeout       : Integer;                 { Given in seconds }
        FTimeStop      : LongInt;                 { Milli-seconds    }
        FMultiThreaded : Boolean;
        function WaitUntilReady : Boolean; virtual;
        function Synchronize(Proc : TPop3NextProc) : Boolean;
    public
        constructor Create(AOwner : TComponent); override;
        function    ConnectSync  : Boolean; virtual;
        function    OpenSync     : Boolean; virtual;
        function    UserSync     : Boolean; virtual;
        function    PassSync     : Boolean; virtual;
        function    RPopSync     : Boolean; virtual;
        function    APopSync     : Boolean; virtual;
        function    QuitSync     : Boolean; virtual;
        function    StatSync     : Boolean; virtual;
        function    ListSync     : Boolean; virtual;
        function    RetrSync     : Boolean; virtual;
        function    TopSync      : Boolean; virtual;
        function    DeleSync     : Boolean; virtual;
        function    NoopSync     : Boolean; virtual;
        function    LastSync     : Boolean; virtual;
        function    RSetSync     : Boolean; virtual;
        function    UidlSync     : Boolean; virtual;
        function    AbortSync    : Boolean; virtual;
    published
        property Timeout : Integer       read  FTimeout
                                         write FTimeout;
        property MultiThreaded : Boolean read  FMultiThreaded
                                         write FMultiThreaded;
    end;

procedure Register;

implementation


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
{$IFDEF VER80}
procedure SetLength(var S: string; NewLength: Integer);
begin
    S[0] := chr(NewLength);
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
function RTrim(Str : String) : String;
var
    i : Integer;
begin
    i := Length(Str);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产色综合久久不卡电影| 亚洲一区二区欧美激情| 中文字幕一区二区三区四区| 午夜在线电影亚洲一区| 成人av资源在线观看| 日韩欧美国产综合一区 | 欧美成人bangbros| 亚洲免费成人av| 国产成人在线视频播放| 欧美一级搡bbbb搡bbbb| 亚洲精品视频观看| www.日韩大片| 国产精品久久久久久久久动漫 | 欧美一二三区精品| 亚洲综合色成人| www.亚洲精品| 中文成人av在线| 国产成人99久久亚洲综合精品| 欧美一区二区成人6969| 婷婷国产在线综合| 欧美体内she精高潮| 一区二区三区免费网站| 色综合中文综合网| 国产精品久久久久久久裸模| 老司机午夜精品99久久| 日韩视频免费直播| 蜜桃精品视频在线观看| 91.com视频| 日韩电影在线免费看| 91精品国产综合久久香蕉麻豆| 亚洲一区在线观看免费| 欧美中文一区二区三区| 一区二区三区不卡在线观看 | 亚洲成人av中文| 欧美午夜精品一区| 五月婷婷久久综合| 欧美日产在线观看| 免费观看在线综合色| 亚洲精品在线网站| 国产精品一区三区| 亚洲国产高清在线| www.日本不卡| 亚洲一区二区三区自拍| 在线不卡中文字幕| 久久国产精品一区二区| 久久精品视频网| 99久久久免费精品国产一区二区| 中文字幕日本不卡| 在线观看www91| 蜜臀av一区二区在线观看| 久久女同精品一区二区| 成人国产亚洲欧美成人综合网| 亚洲人成网站在线| 欧美一区二区私人影院日本| 国产一区二区在线看| 国产精品理论片在线观看| 日本道精品一区二区三区| 视频一区二区三区在线| 亚洲精品一区二区三区在线观看| 成人福利电影精品一区二区在线观看| 亚洲视频在线观看三级| 日韩一区二区在线观看视频播放| 国产福利电影一区二区三区| 亚洲欧美一区二区三区国产精品 | 麻豆久久久久久| 欧美—级在线免费片| 欧美中文字幕一区| 国产麻豆精品视频| 婷婷成人激情在线网| 2023国产精品自拍| 欧美亚洲综合在线| 国产精品99久久久久久似苏梦涵 | 极品少妇xxxx精品少妇偷拍 | 99精品国产视频| 日韩综合小视频| 中文字幕+乱码+中文字幕一区| 欧美三级电影网| 国产91丝袜在线观看| 日日骚欧美日韩| 国产精品欧美一区二区三区| 欧美一级在线视频| 91无套直看片红桃| 国产综合一区二区| 日韩成人伦理电影在线观看| 国产精品国产馆在线真实露脸| 欧美一区二区精品在线| 色激情天天射综合网| 国产成人精品三级| 久久99精品一区二区三区 | 欧美视频一区二区三区四区 | 中文字幕在线观看不卡| 欧美成人女星排行榜| 欧美男人的天堂一二区| 99国产精品视频免费观看| 国产乱子伦一区二区三区国色天香| 亚洲不卡在线观看| 亚洲男人电影天堂| 亚洲欧洲三级电影| 国产欧美精品一区| 久久婷婷综合激情| 欧美一区二区三区在线电影| 欧美日韩国产在线观看| 欧洲人成人精品| 一本色道a无线码一区v| 91首页免费视频| 91视视频在线观看入口直接观看www | 亚洲欧美日韩国产综合在线| 国产视频一区二区三区在线观看| 欧美一级二级三级乱码| 91精品免费观看| 欧美一区二区三区四区视频| 欧美日本免费一区二区三区| 欧美日韩午夜在线| 欧美精品三级日韩久久| 欧美精品色综合| 欧美日韩精品一区二区| 欧美影视一区二区三区| 欧美日韩精品三区| 欧美一级日韩不卡播放免费| 7777精品伊人久久久大香线蕉完整版 | 人人狠狠综合久久亚洲| 久久精品噜噜噜成人88aⅴ| 免费三级欧美电影| 精品影视av免费| 国产尤物一区二区在线| 国产98色在线|日韩| 97久久超碰国产精品电影| av午夜精品一区二区三区| 91蜜桃视频在线| 欧美午夜精品久久久久久超碰 | 亚洲h精品动漫在线观看| 亚洲国产精品一区二区www| 日本va欧美va瓶| 国产电影精品久久禁18| 91猫先生在线| 欧美日韩色综合| 久久婷婷国产综合国色天香| 国产亚洲一本大道中文在线| 国产精品久久久久久久久免费相片 | 亚洲一区国产视频| 美日韩黄色大片| eeuss鲁片一区二区三区在线观看| aaa欧美日韩| 欧美一区二区三区思思人| 久久久一区二区三区捆绑**| 亚洲人快播电影网| 久久精品国产澳门| av成人免费在线观看| 在线不卡欧美精品一区二区三区| 日韩欧美卡一卡二| 亚洲欧洲三级电影| 久久疯狂做爰流白浆xx| 91影视在线播放| 日韩欧美在线网站| 亚洲女同一区二区| 精品一区二区三区视频在线观看| 91视视频在线观看入口直接观看www| 欧美日韩三级在线| 中文字幕中文字幕一区| 久久se这里有精品| 在线观看日韩一区| 久久精品一区二区三区av| 亚洲一区二区三区不卡国产欧美| 国产伦精品一区二区三区在线观看| 色综合久久99| 国产亚洲婷婷免费| 美国毛片一区二区三区| 91原创在线视频| 欧美激情综合网| 久久精品国产亚洲a| 日本乱人伦一区| 国产精品国产三级国产有无不卡 | 欧美无砖砖区免费| 欧美经典一区二区| 激情文学综合丁香| 欧美日韩电影在线| 亚洲人亚洲人成电影网站色| 精品一区二区在线观看| 欧美精品一二三| 亚洲国产你懂的| 在线精品视频免费观看| 国产精品国产三级国产有无不卡| 精久久久久久久久久久| 欧美二区乱c少妇| 亚洲第一福利视频在线| 一本一本久久a久久精品综合麻豆| 久久久亚洲午夜电影| 精品一区二区三区在线观看 | 日本一区二区在线不卡| 亚洲电影第三页| 波多野结衣中文字幕一区二区三区| 日韩久久精品一区| 亚洲国产欧美在线| 欧洲av一区二区嗯嗯嗯啊| 中文字幕在线不卡| 成人aa视频在线观看| 日本一区二区视频在线| 国产成人亚洲精品青草天美| 久久青草欧美一区二区三区| 经典一区二区三区|