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

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

?? cli5.pas

?? 包含常用Internet協議TCP,UDP、HTTP、FTP、Telnet等
?? PAS
字號:
{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Author:       Fran鏾is PIETTE
Object:       Simple client application demonstrating TWSocket object in action.
EMail:        francois.piette@pophost.eunet.be    
              francois.piette@rtfm.be             http://www.rtfm.be/fpiette
Creation:     September 21, 1996
Version:      2.06
Support:      Use the mailing list twsocket@rtfm.be See website for details.
Legal issues: Copyright (C) 1996, 1997, 1998, 1999 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.

Updates:
Sep 06, 1997 Beautified
Nov 09, 1997 Added a button to display the list of IP addresses for the
             local computer (you can have two IP addresses if you are connected
             to a LAN and to your ISP).
Nov 11, 1997 V2.03 Added a ReadLine button to show how to read a single line
             synchronously.
Nov 18, 1997 V2.04 Show how to use ReceiveStr
Dec 05, 1998 V2.05 Don't use TWait component anymore
Aug 20, 1999 V2.06 Introduced FError to disply connection errors correctly.

 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
unit cli5;

interface

uses
  WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls,
  Forms, Dialogs, Winsock, WSocket, StdCtrls;

const
  Client5Version        = 206;

type
  TClientForm = class(TForm)
    ConnectButton: TButton;
    CliSocket: TWSocket;
    InfoLabel: TLabel;
    DisconnectButton: TButton;
    DataLabel: TLabel;
    IPButton: TButton;
    ReadLineButton: TButton;
    procedure ConnectButtonClick(Sender: TObject);
    procedure DisconnectButtonClick(Sender: TObject);
    procedure CliSocketDataAvailable(Sender: TObject; Error: Word);
    procedure CliSocketSessionConnected(Sender: TObject; Error: Word);
    procedure CliSocketSessionClosed(Sender: TObject; Error: Word);
    procedure IPButtonClick(Sender: TObject);
    procedure ReadLineButtonClick(Sender: TObject);
  public
    FError : Word;
  end;

var
  ClientForm: TClientForm;

implementation

{$R *.DFM}

{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
{* This event handler gets called when we connected the server             *}
procedure TClientForm.CliSocketSessionConnected(Sender: TObject; Error: Word);
begin
    FError := Error; { Remember error code for SessionClosed event }
    if Error <> 0 then
        InfoLabel.Caption    := 'Connection failed, error #' + IntToStr(Error)
    else
        InfoLabel.Caption    := 'Connected';
    DisconnectButton.Enabled := TRUE;
    ConnectButton.Enabled    := FALSE;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
{* This event handler gets called when the server's connection is broken   *}
{* Either by us or by the server.                                          *}
procedure TClientForm.CliSocketSessionClosed(Sender: TObject; Error: Word);
begin
    DataLabel.Caption        := '';
    if FError = 0 then begin
        { FError = 0 means we connected succesfully }
        if Error <> 0 then
            InfoLabel.Caption := 'Disconnected. Error #' + IntToStr(Error)
        else
            InfoLabel.Caption := 'Disconnected';
    end;
    DisconnectButton.Enabled := FALSE;
    ConnectButton.Enabled    := TRUE;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
{* The user has clicked on the connect button...                           *}
procedure TClientForm.ConnectButtonClick(Sender: TObject);
begin
    CliSocket.Addr   := 'localhost';        { Server host name              }
    CliSocket.Proto  := 'tcp';              { Protocol we wants to use      }
    CliSocket.Port   := 'telnet';           { The port we wants to connect  }
    CliSocket.Connect;                      { Let's connect !               }
    { Connect is just a request, it returns immediately. We eventually gets }
    { gets connected later. At that time we will receive the event          }
    { SessionConnected. If you need a timeout, you have to start a TTimer.  }
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
{* The user has clicked the disconnect button...                           *}
procedure TClientForm.DisconnectButtonClick(Sender: TObject);
begin
    CliSocket.Close;                     { This will close the connection   }
    { When the connection will be effectively closed, we will receive the   }
    { SessionClosed even.                                                   }
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TClientForm.CliSocketDataAvailable(Sender: TObject; Error: Word);
begin
    DataLabel.Caption := CliSocket.ReceiveStr;
end;

{$IFDEF NEVER}
{ The same procedure using Receive: a little bit more complicated but }
{ more efficient because data is less copied from here to there.      }
procedure TClientForm.CliSocketDataAvailable(Sender: TObject; Error: Word);
var
    Buffer : String[200];
    Count  : Integer;
begin
    Count             := CliSocket.Receive(@Buffer[1], High(Buffer));
    Buffer[0]         := chr(Count);
    DataLabel.Caption := Buffer;
end;
{$ENDIF}


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TClientForm.IPButtonClick(Sender: TObject);
var
    IPList : TStrings;
    I      : Integer;
begin
    IPList := WSocket.LocalIPList;
    InfoLabel.Caption := '';
    for I := 0 to IPList.Count - 1 do
        InfoLabel.Caption := InfoLabel.Caption + '   ' + IPList.Strings[I];
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TClientForm.ReadLineButtonClick(Sender: TObject);
var
    Buf : String;
begin
    ReadLineButton.Enabled := FALSE;
    try
        CliSocket.ReadLine(30, Buf);
        DataLabel.Caption      := 'Line: ''' + Buf + '''';
    finally
        ReadLineButton.Enabled := TRUE;
    end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久网这里都是精品| 精品国产伦一区二区三区观看方式| 美女网站一区二区| 亚洲夂夂婷婷色拍ww47| 一区二区三区日韩欧美| 亚洲另类在线视频| 亚洲激情图片qvod| 亚洲国产中文字幕| 亚洲成av人片一区二区梦乃| 首页综合国产亚洲丝袜| 日日夜夜免费精品| 久久国产免费看| 国产成人精品一区二区三区网站观看 | 久久91精品国产91久久小草 | 国产偷v国产偷v亚洲高清| www激情久久| 国产精品久久久久久亚洲伦| 亚洲少妇最新在线视频| 亚洲国产成人av网| 捆绑紧缚一区二区三区视频| 国产综合色视频| 91在线看国产| 在线播放日韩导航| 精品国产乱码久久久久久老虎 | 中文字幕在线观看不卡视频| 亚洲人成亚洲人成在线观看图片| 亚洲电影一区二区| 久久成人久久爱| 97国产一区二区| 欧美成人精品1314www| 中文字幕免费不卡| 偷拍日韩校园综合在线| 国产成人在线色| 欧美日韩一级片在线观看| 久久婷婷国产综合精品青草| 日韩毛片视频在线看| 蜜臀av在线播放一区二区三区| 国产99久久久国产精品| 欧美福利视频导航| 国产精品久久久久久久久搜平片| 亚洲一区二区三区四区五区黄| 国产一区二区三区最好精华液| 在线观看网站黄不卡| 欧美tickling挠脚心丨vk| 自拍偷拍亚洲欧美日韩| 免费观看在线综合| 色婷婷av久久久久久久| 久久综合av免费| 天堂一区二区在线免费观看| 国产福利一区在线| 欧美mv日韩mv国产网站app| 亚洲综合免费观看高清在线观看| 国产河南妇女毛片精品久久久| 欧美一级理论片| 亚洲男同性恋视频| 懂色一区二区三区免费观看| 日韩一级片网站| 亚洲成人自拍偷拍| 91黄视频在线| 亚洲欧美一区二区三区孕妇| 国产露脸91国语对白| 日韩免费观看高清完整版| 午夜在线电影亚洲一区| 在线观看中文字幕不卡| 亚洲欧美另类在线| 色偷偷久久人人79超碰人人澡| 日本一区二区三级电影在线观看| 久久精品理论片| 精品日韩欧美一区二区| 久久99久久99| 日韩一区二区在线看| 蜜臀91精品一区二区三区| 欧美一区二区三区在线电影| 亚洲国产精品久久久久婷婷884| 91成人在线免费观看| 亚洲午夜在线视频| 欧美剧在线免费观看网站| 亚洲不卡av一区二区三区| 在线观看成人小视频| 亚洲不卡av一区二区三区| 欧美精品777| 极品少妇xxxx精品少妇| www久久精品| www.日韩精品| 亚洲免费大片在线观看| 欧美在线三级电影| 蜜臀av一区二区在线观看| 337p粉嫩大胆色噜噜噜噜亚洲| 久久99久久久久| 中文字幕第一区| 色哟哟一区二区三区| 午夜精品久久久久影视| 精品国产一区久久| 成人av网址在线观看| 亚洲激情自拍偷拍| 日韩欧美成人一区| www.av亚洲| 日韩电影免费一区| 国产精品色婷婷久久58| 欧美天堂一区二区三区| 国内精品免费**视频| 国产欧美一区二区三区鸳鸯浴| 91视频一区二区三区| 免费久久99精品国产| 国产精品美女久久久久久久| 欧美视频一二三区| 国产精品亚洲午夜一区二区三区| 自拍偷在线精品自拍偷无码专区| 欧美日韩一区不卡| 国产成人在线视频网址| 一级女性全黄久久生活片免费| 欧美大片在线观看一区| 91免费版在线| 国产在线视视频有精品| 亚洲一区在线电影| 久久精品亚洲精品国产欧美| 欧美性色综合网| 国产一区二区在线观看免费| 亚洲国产一二三| 欧美激情自拍偷拍| 欧美电影免费观看完整版| 色婷婷国产精品久久包臀| 国产一区在线不卡| 日韩成人一区二区三区在线观看| 国产精品久久精品日日| 欧美成人一级视频| 欧美日韩国产精品自在自线| 成人激情小说网站| 久久99精品久久久久久 | 欧美精品久久一区| 99精品久久免费看蜜臀剧情介绍| 美国av一区二区| 视频一区二区国产| 亚洲精品一卡二卡| 国产精品国产精品国产专区不蜜| 日韩欧美一级精品久久| 欧美乱妇一区二区三区不卡视频| yourporn久久国产精品| 国产黄色精品视频| 国产盗摄视频一区二区三区| 日本在线不卡一区| 日韩成人一区二区三区在线观看| 亚洲观看高清完整版在线观看| 亚洲视频中文字幕| 亚洲天天做日日做天天谢日日欢| 中文成人综合网| 欧美韩国日本综合| 欧美国产亚洲另类动漫| 欧美韩国日本不卡| 中文字幕欧美国产| 国产精品视频麻豆| 中文字幕视频一区| 国产精品家庭影院| 国产精品高潮呻吟| 中文字幕人成不卡一区| 国产精品毛片a∨一区二区三区| 国产三区在线成人av| 欧美韩国日本不卡| 国产精品国产三级国产普通话99| 国产欧美一区二区精品性色超碰| 久久综合色综合88| 国产日韩欧美亚洲| 国产精品视频观看| 一区二区久久久久| 调教+趴+乳夹+国产+精品| 欧美aaa在线| 国产一区高清在线| 成人av资源在线观看| 色哟哟精品一区| 3atv一区二区三区| 精品国产乱码久久久久久牛牛| 国产视频视频一区| 亚洲综合久久av| 蜜臀av在线播放一区二区三区| 国内精品写真在线观看 | 亚洲影视在线播放| 日本欧美一区二区三区| 国产美女视频91| 91浏览器入口在线观看| 欧美夫妻性生活| 国产偷国产偷亚洲高清人白洁| 亚洲精品自拍动漫在线| 日韩电影免费在线看| 国产精品99久久久| 欧美综合一区二区| 国产亚洲一区二区三区四区| 亚洲精品中文字幕乱码三区| 久久精品国产**网站演员| 91影院在线观看| 91精品国产美女浴室洗澡无遮挡| 国产欧美精品一区二区色综合朱莉| 最新国产の精品合集bt伙计| 美女一区二区视频| 欧美中文字幕不卡| 国产人成一区二区三区影院| 午夜精品影院在线观看| 99久久精品国产精品久久| 日韩欧美一区电影| 亚洲不卡av一区二区三区| 成人免费高清视频在线观看|