TIdTCPServer控制項中文指南

來源:互聯網
上載者:User

TIdTCPServer控制項中文指南 .
2009-01-08 13:53 236人閱讀 評論(0) 收藏 舉報 
 IdTCPServer 
簡介
該控制項包含一個完整的、多線程TCP伺服器。該控制項使用一個或者多個線程監聽(listen)客戶機串連,使用

時與TIdThreadMgr聯合使用,將每個線程分配給與客戶機串連的串連上。

TIdTCPServer提供允許設定管理員監聽線程的功能,包括:
DefaultPort
ListenQueue
OnListenException
ReuseSocket
MaxConnections
MaxConnectionReply
該控制項也提供控制協議特殊功能的屬性和方法,包括:
Greeting
ReplyExceptionCode
ReplyUnknownCommand
該控制項用來實現兩機之間的串連,支援以下事件:
OnConnect
OnExecute
OnDisconnect
OnException
該控制項支援協議命令的控制,包括:
CommandHandlers
CommandHandlersEnabled
OnNoCommandHandler
OnAfterCommandHandler
OnBeforeCommandHandler

該控制項是以下控制項的父類:
TIdChargenServer, TIdDayTimeServer, TIdDICTServer, TIdEchoServer, TIdFingerServer,

TIdGopherServer, TIdHostNameServer, TIdHTTPServer, TIdIRCServer, TIdNNTPServer, TIdQUOTDServer,

TIdTelnetServer, TIdWhoisServer

一些重要的屬性
property ListenQueue: integer;
允許排隊未解決的最大監聽串連數。

property ReuseSocket: TIdReuseSocket;
本地地址中被重新使用的監聽線程。

property MaxConnections: Integer;
最大允許的串連數。

property MaxConnectionReply: TIdRFCReply;
到達最大串連後,返回給其它請求的串連的訊息。

property ReplyExceptionCode: Integer;
在發生異常後,返回給串連的代碼。

property ReplyTexts: TIdRFCReplies;
伺服器實現的協議響應。

property ReplyUnknownCommand: TIdRFCReply;
對未知命令的響應。

property CommandHandlers: TIdCommandHandlers;
命令處理器集合。

property CommandHandlersEnabled: boolean;
在監聽線程串連時是否使用命令處理器。

property Greeting: TIdRFCReply;
當監聽線程串連成功後發送的標題資訊。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.