转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 软件开发 >> Delphi程序 >> 正文
TCP/IP 使网络连接驱向简单化         ★★★★

TCP/IP 使网络连接驱向简单化

作者:闵涛 文章来源:闵涛的学习笔记 点击数:2106 更新时间:2009/4/23 18:43:55
;
  procedure finish_getdir;
public   (* will become public once tested *)
  procedure changedir(const f_dir:string);
  procedure removefile(const filename:string);
  procedure removedir(const dirname:string);
  procedure makedir(const dirname:string);
  procedure renamefile(const prior,after:string);
  procedure getdir(const dirname:string);
  function getdirentry:t_filedata;
public
  property stream: TStream read f_stream write SetStream;
  property status_number: integer read f_status_nr;
  property status_text: string read f_status_txt;
  property busy: boolean read f_busy;
  procedure login; override;
  procedure logout; override;
  procedure download;
  procedure upload;
  procedure abort;
  procedure noop;
  constructor Create(Aowner:TComponent); override;
  destructor Destroy; override;
  procedure action; override;
  property Size:integer read f_size;
published
  property Hostname: string read f_hostname write f_hostname;
  property URI: string read f_url write f_url;
  property Password:string read f_password write f_password;
  property Username:string read f_user write f_user;
  property Passive:boolean read f_passive write f_passive default true;
  property Port:word read f_port write f_port default 21;
  property Mode:t_ftp_mode read f_mode write f_mode default tftp_download;
  property OnDataReceived:TDataTransferProc read f_ondata_got write f_ondata_got;
  property OnActionComplete:TFTPActionCompleteProc read f_onaction write f_onaction;
  property Async:boolean read f_async_data write f_async_data;
  property OnTrace;
end;
(*@\\\0000003501*)

  { Time, RExec, LPR - the most useful UNIX services }
(*@///   T_Time = class(T_TcpIp)          // RFC 868 *)
T_Time = class(T_TcpIp)
protected
  f_time: TDateTime;
  f_timemode: T_TimeMode;
public
  constructor Create(Aowner:TComponent); override;
  procedure action; override;
  property time: TDateTime read f_time;
published
  property Hostname: string read f_hostname write f_hostname;
  property TimeMode: T_TimeMode read f_timemode write f_timemode default tzUTC;
  end;
(*@\\\0000000103*)
(*@///   T_RCommon = class(T_TcpIp) *)
T_RCommon = class(T_TcpIp)
protected
  procedure open_socket_out(var socket:TSocket; Socket_number:smallint;ip_address:longint); override;
public
  procedure action; override;
  property stream: TStream read f_stream;
published
  property Hostname: string read f_hostname write f_hostname;
  end;
(*@\\\0000000103*)
(*@///   T_RExec = class(T_RCommon) *)
T_RExec = class(T_RCommon)
protected
  f_user: string;
  f_pass: string;
  f_command: string;
  procedure login; override;
public
  constructor Create(Aowner:TComponent); override;
published
  property UserName: string read f_user write f_user;
  property Password: string read f_pass write f_pass;
  property Command: string read f_command write f_command;
  end;
(*@\\\0000000113*)
(*@///   T_Rsh = class(T_RCommon) *)
T_Rsh = class(T_RCommon)
protected
  f_user_r: string;
  f_user_l: string;
  f_command: string;
  procedure login; override;
public
  constructor Create(Aowner:TComponent); override;
published
  property LocalUser: string read f_user_l write f_user_l;
  property RemoteUser: string read f_user_r write f_user_r;
  property Command: string read f_command write f_command;
  end;
(*@\\\0000000111*)
(*@///   T_lpr = class(T_TcpIp)           // RFC 1179 *)
T_lpr = class(T_TcpIp)
protected
  f_printtype: t_lpr_types;
  f_banner: boolean;
  f_count: integer;
  f_user: string;
  f_queue: string;
  f_user_mail: string;
  f_jobname: string;
  f_title: string;
  procedure response;
  procedure open_socket_out(var socket:TSocket; Socket_number:smallint;ip_address:longint); override;
public
  constructor Create(Aowner:TComponent); override;
  property stream: TStream read f_stream write SetStream;
  procedure action; override;
  procedure SendPrintData;
  procedure GetQueueStatus(detailed:boolean);
published
  property Hostname: string read f_hostname write f_hostname;
  property User: string read f_user write f_user;
  property PrintQueue: string read f_queue write f_queue;
  property MailTo: string read f_user_mail write f_user_mail;
  property JobName: string read f_jobname write f_jobname;
  property PrintType:t_lpr_types read f_printtype write f_printtype default lp_ascii;
  property CopyCount:integer read f_count write f_count default 1;
  property PrintBanner:boolean read f_banner write f_banner default false;
  property PrintTitle:string read f_title write f_title;
  end;
(*@\\\0000000103*)

  { The Mail and News protocols }
(*@///   T_SMTP = class(T_TcpIp)          // RFC 821 *)
T_SMTP = class(T_TcpIp)
protected
  f_user, f_host: string;
  f_status_nr: integer;
  f_status_txt: string;
  f_receipts, f_body: tstringlist;
  procedure SetBody(Value: TStringList);
  procedure SetRecipients(Value: TStringList);
  procedure response;
public
  constructor Create(Aowner:TComponent); override;
  destructor Destroy; override;
  procedure action; override;
  property Recipients: TStringlist read f_receipts write SetRecipients;
  property Message: TStringList read f_body write SetBody;
  property Sender: string read f_user write f_user;
published
  property Hostname: string read f_hostname write f_hostname;
  property OnTrace;
  end;
(*@\\\0000001001*)
(*@///   T_Pop3 = class(T_TcpIp)          // RFC 1725 *)
T_Pop3 = class(T_TcpIp)
protected
  f_user: string;
  f_pass: string;
  f_list: TList;
  f_mail: TStringList;
  procedure response;
public
  property Mail: TStringlist read f_mail;
  constructor Create(Aowner:TComponent); override;
  destructor Destroy; override;
  procedure action; override;     (* retrieval of first message *)
  procedure Login; override;
  procedure GetHeaders;
  procedure Logout; override;
  procedure GetMail(index: integer);
  procedure DeleteMail(index:integer);
published
  property Hostname: string read f_hostname write f_hostname;
  property UserName: string read f_user write f_user;
  property Password: string read f_pass write f_pass;
  property OnTrace;
end;
(*@\\\0000001701*)
(*@///   T_NNTP = class(T_TcpIp)          // RFC 977 *)
T_NNTP = class(T_TcpIp)
protected
  f_news: TStringList;
  f_newsgroups: TStringList;
  f_status_nr: integer;
  f_status_txt: string;
  procedure response;
  procedure action; override;     (* ??? *)
  procedure SetNews(value:TStringlist);
  procedure GetArticleInternally;
public
  property News: TStringlist read f_news write SetNews;
  property NewsGroups: TStringlist read f_newsgroups;
  constructor Create(Aowner:TComponent); override;
  destructor Destroy; override;
  procedure Login; override;
  procedure Logout; override;
    (* To get an article from a URL like nntp://hostname/number *)
  procedure GetArticle(const group:string; index:integer);
    (* To get an article from a URL like news:msgid *)
  procedure GetArticleID(const msgid:string);
  procedure PostArticle;
    (* Methods more for a Newsreader *)
  procedure GetAllNewsgroups;
  procedure GetNewNewsgroups(since:TDateTime);
  procedure SetGroup(const group:string; var low,high,count: integer);
  procedure GetArticleNr(index:integer);
  procedure SetCurrentArticle(index:integer);
  procedure GetCurrentArticle;
  procedure GetNextArticle;
  procedure GetPreviousArticle;
published
  property Hostname: string read f_hostname write f_hostname;
  property OnTrace;
end;
(*@\\\0000002301*)

  { Mail and News text components }
(*@///   T_MailNews = class(TComponent) *)
T_MailNews = class(TComponent)
protected
  f_from, f_sender, f_subject: string;
  f_body: TStringlist;
  f_add_header: TStringlist;
  f_message: TStringlist;
  f_references: string;
  f_replyto: string;
  procedure SetBody(Value: TStringList);
  procedure SetHeader(Value: TStringList);
public
  constructor Create(Aowner:TComponent); override;
  destructor Destroy; override;
  procedure action; VIRTUAL;
published
  property Sender: string read f_sender write f_sender;
  property From: string read f_from write f_from;
  property Body: TStringList read f_body write SetBody;
  property Heade

上一页  [1] [2] [3]  下一页


[Delphi程序]TCP/IP (五)  [Delphi程序]TCP/IP (四)
[Delphi程序]TCP/IP (三)  [Delphi程序]TCP/IP 使网络连接驱向简单化(二)
[VB.NET程序]用VB5 Winsock控件创建TCP\IP客户机 服务器程序  [MySql]Linux TCP/IP 协议栈源码分析(一)
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · C语言系列  · VB.NET程序
    · JAVA开发  · Delphi程序
    · 脚本语言
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台