DICT協定

DICT協定

詞典網路協定,在RFC 2009中進行描述。它的目標是超越Webster protocol,並允許客戶端在使用過程中訪問更多字典。Dict伺服器和客戶機使用TCP連線埠2628。

基本介紹

  • 中文名:DICT協定
  • 全名:詞典網路協定
  • 目標:超越Webster protocol
  • 平台:windows
使用方法
該協定約定伺服器端偵聽連線埠號:2628,首先telnet連線到216.18.20.172,
運行CMD,執行telnet,連線到216.18.20.172 2628
執行help
結果如圖所示:
再來認識一個命令:DEFINE,接收參數包括數據名稱,單詞,以空白字元結束,必須的,否則會提示語法錯誤或參數錯誤,
命令與參數這間,多個參數之間都需要用空白字元分隔
如:DEFINE * hello 注意hello後邊一定要跟一個空白字元如空格或TAB
伺服器回響如下圖
DICT協定
150為伺服器回響碼,一般以1打頭的基本都是正確的回響,比較詳細列表如下
* 110 n databases present - text follows * 111 n strategies available - text follows 112 database information follows 113 help text follows 114 server information follows 130 challenge follows * 150 n definitions retrieved - definitions follow * 151 word database name - text follows * 152 n matches found - text follows 210 (optional timing and statistical information here) * 220 text msg-id 221 Closing Connection 230 Authentication successful 250 ok (optional timing information here) 330 send response 420 Server temporarily unavailable 421 Server shutting down at operator request 500 Syntax error, command not recognized 501 Syntax error, illegal parameters 502 Command not implemented 503 Command parameter not implemented 530 Access denied 531 Access denied, use "SHOW INFO" for server information 532 Access denied, unknown mechanism 550 Invalid database, use "SHOW DB" for list of databases 551 Invalid strategy, use "SHOW STRAT" for a list of strategies 552 No match 554 No databases present 555 No strategies available
500 Syntax error, command not recognized
501 Syntax error, illegal parameters
502 Command not implemented
503 Command parameter not implemented
420 Server temporarily unavailable
421 Server shutting down at operator request
151 "hello" gcide “The Collaborative International Dictionary of English v.0.48”
hello 為我們輸入,gcide為資料庫縮寫,後邊引號引起來的即為它的全稱,
DEFINE後邊的*號表示,查詢所有可用資料庫,再往後的就是要查詢的單詞嘍,還可以使用!號代替*號,或者使用具體的資料庫來代替
如輸入:DEFINE wn hello
結果如圖所示
DICT協定
再來認識一個命令,SHOW DB
全稱為 SHOW DATABASES,此命令將輸出所有可用的資料庫列表,如圖
DICT協定
SHOW STRAT命令列印目前支付的策略,策略也是個好東西,回頭單說
DICT協定

相關詞條

熱門詞條

聯絡我們