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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sender1.pas

?? 包含常用Internet協(xié)議TCP,UDP、HTTP、FTP、Telnet等
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Author:       Fran鏾is PIETTE
Description:  Simple client program which just send data to a server and display
              all incomming data.
EMail:        francois.piette@pophost.eunet.be    francois.piette@rtfm.be
              http://www.rtfm.be/fpiette
Creation:     Oct 01, 1998
Version:      1.03
Support:      Use the mailing list twsocket@rtfm.be See website for details.
Legal issues: Copyright (C) 1998 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.

History:
Oct 28, 1998  V1.02 Trapped Connect exceptions.
                    Added AutoStartButton and associated logic.
                    Added LingerCheckBox and associated logic.
Mar 07, 1999  V1.03 Adapted for Delphi 1


 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
unit Sender1;

interface

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

const
  WM_AUTO_START      = WM_USER + 1;
  WM_CLOSE_REQUEST   = WM_USER + 2;

type
{$IFDEF VER80}
  LParam = LongInt;
{$ENDIF}
  TSenderForm = class(TForm)
    Panel1: TPanel;
    Label1: TLabel;
    ServerEdit: TEdit;
    Label2: TLabel;
    PortEdit: TEdit;
    Label3: TLabel;
    DataEdit: TEdit;
    Label4: TLabel;
    RepeatEdit: TEdit;
    ContCheckBox: TCheckBox;
    ActionButton: TButton;
    DisplayMemo: TMemo;
    Label5: TLabel;
    LengthEdit: TEdit;
    WSocket1: TWSocket;
    DisplayDataCheckBox: TCheckBox;
    UseDataSentCheckBox: TCheckBox;
    PauseButton: TButton;
    CountLabel: TLabel;
    AutoStartButton: TButton;
    LingerCheckBox: TCheckBox;
    procedure FormCreate(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure ContCheckBoxClick(Sender: TObject);
    procedure WSocket1DnsLookupDone(Sender: TObject; Error: Word);
    procedure WSocket1SessionConnected(Sender: TObject; Error: Word);
    procedure ActionButtonClick(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure WSocket1DataAvailable(Sender: TObject; Error: Word);
    procedure WSocket1SessionClosed(Sender: TObject; Error: Word);
    procedure DisplayDataCheckBoxClick(Sender: TObject);
    procedure UseDataSentCheckBoxClick(Sender: TObject);
    procedure PauseButtonClick(Sender: TObject);
    procedure AutoStartButtonClick(Sender: TObject);
  private
    FIniFileName : String;
    FInitialized : Boolean;
    FDataBuf     : PChar;
    FDataBufSize : Integer;
    FCount       : Integer;
    FFinalCount  : Integer;
    FSending     : Boolean;
    FDisplayData : Boolean;
    FUseDataSent : Boolean;
    FFinished    : Boolean;
    FPaused      : Boolean;
    FAutoStart   : Integer;
    procedure Display(Msg : String);
    procedure DoSend;
    procedure WSocket1DataSent(Sender: TObject; Error: Word);
    procedure WSocket1NoDataSent(Sender: TObject; Error: Word);
    procedure WMAutoStart(var msg: TMessage); message WM_AUTO_START;
    procedure WMCloseRequest(var msg: TMessage); message WM_CLOSE_REQUEST;
  public
    { D閏larations publiques }
  end;

var
  SenderForm: TSenderForm;

implementation

{$R *.DFM}

const
    SectionWindow   = 'RecvForm';
    KeyTop          = 'Top';
    KeyLeft         = 'Left';
    KeyWidth        = 'Width';
    KeyHeight       = 'Height';
    SectionData     = 'Data';
    KeyPort         = 'Port';
    KeyServer       = 'Server';
    KeyData         = 'Data';
    KeyRepeat       = 'RepeatCount';
    KeyContinuous   = 'ContinuousSend';
    KeyLength       = 'DataLength';
    KeyUseDataSent  = 'UseDataSent';
    KeyDisplay      = 'Display';
    KeyLinger       = 'Linger';


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TSenderForm.FormCreate(Sender: TObject);
begin
    FIniFileName := LowerCase(ExtractFileName(Application.ExeName));
    FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini';
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TSenderForm.FormShow(Sender: TObject);
var
    IniFile : TIniFile;
begin
    if not FInitialized then begin
        FInitialized := TRUE;
        IniFile      := TIniFile.Create(FIniFileName);
        Width        := IniFile.ReadInteger(SectionWindow, KeyWidth,  Width);
        Height       := IniFile.ReadInteger(SectionWindow, KeyHeight, Height);
        Top          := IniFile.ReadInteger(SectionWindow, KeyTop,
                                            (Screen.Height - Height) div 2);
        Left         := IniFile.ReadInteger(SectionWindow, KeyLeft,
                                            (Screen.Width  - Width)  div 2);
        PortEdit.Text        := IniFile.ReadString(SectionData, KeyPort, 'telnet');
        ServerEdit.Text      := IniFile.ReadString(SectionData, KeyServer, 'localhost');
        DataEdit.Text        := IniFile.ReadString(SectionData, KeyData,       'The quick brown fox jumps over the lazy dog');
        RepeatEdit.Text      := IniFile.ReadString(SectionData, KeyRepeat,     '');
        LengthEdit.Text      := IniFile.ReadString(SectionData, KeyLength,     '60');
        ContCheckBox.Checked        := Boolean(IniFile.ReadInteger(SectionData, KeyContinuous,  0));
        LingerCheckBox.Checked      := Boolean(IniFile.ReadInteger(SectionData, KeyLinger,      1));
        DisplayDataCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyDisplay,     0));
        UseDataSentCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyUseDataSent, 1));
        IniFile.Destroy;
        RepeatEdit.Enabled := not ContCheckBox.Checked;
        CountLabel.Caption  := '';
    end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TSenderForm.FormClose(Sender: TObject; var Action: TCloseAction);
var
    IniFile : TIniFile;
begin
    IniFile := TIniFile.Create(FIniFileName);
    IniFile.WriteInteger(SectionWindow, KeyTop,       Top);
    IniFile.WriteInteger(SectionWindow, KeyLeft,      Left);
    IniFile.WriteInteger(SectionWindow, KeyWidth,     Width);
    IniFile.WriteInteger(SectionWindow, KeyHeight,    Height);
    IniFile.WriteString(SectionData, KeyPort,   PortEdit.text);
    IniFile.WriteString(SectionData, KeyServer, ServerEdit.text);
    IniFile.WriteString(SectionData, KeyData,   DataEdit.text);
    IniFile.WriteString(SectionData, KeyRepeat, RepeatEdit.text);
    IniFile.WriteString(SectionData, KeyLength, LengthEdit.text);
    IniFile.WriteInteger(SectionData, KeyContinuous,  Ord(ContCheckBox.Checked));
    IniFile.WriteInteger(SectionData, KeyLinger,      Ord(LingerCheckBox.Checked));
    IniFile.WriteInteger(SectionData, KeyUseDataSent, Ord(UseDataSentCheckBox.Checked));
    IniFile.WriteInteger(SectionData, KeyDisplay,     Ord(DisplayDataCheckBox.Checked));
    IniFile.Destroy;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TSenderForm.FormDestroy(Sender: TObject);
begin
    if FDataBuf <> nil then begin
        Freemem(FDataBuf, FDataBufSize);
        FDataBuf := nil;
    end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TSenderForm.ContCheckBoxClick(Sender: TObject);
begin
    RepeatEdit.Enabled := not ContCheckBox.Checked;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TSenderForm.Display(Msg : String);
begin
    if DisplayMemo.lines.Count > 200 then
        DisplayMemo.Clear;
    DisplayMemo.Lines.Add(Msg);
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
{$IFDEF VER80}
function TrimRight(Str : String) : String;
var
    i : Integer;
begin
    i := Length(Str);
    while (i > 0) and (Str[i] = ' ') do
        i := i - 1;
    Result := Copy(Str, 1, i);
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
function TrimLeft(Str : String) : String;
var
    i : Integer;
begin
    if Str[1] <> ' ' then
        Result := Str
    else begin
        i := 1;
        while (i <= Length(Str)) and (Str[i] = ' ') do
            i := i + 1;
        Result := Copy(Str, i, Length(Str) - i + 1);
    end;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
function Trim(Str : String) : String;
begin
    Result := TrimLeft(TrimRight(Str));
end;
{$ENDIF}


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TSenderForm.ActionButtonClick(Sender: TObject);
var
    Len : Integer;
    N   : Integer;
    T   : Integer;
    Buf : String;
begin
    { The ActionButton is used to start or stop data transmission }
    if FSending then begin
        { We are already sending, so user wants to stop }
        { Display updated counter                       }
        CountLabel.Caption := IntToStr(FCount);

        { Check if some data remains in TWSocket's internal buffer }
        if (not WSocket1.AllSent) and
           (Application.MessageBox('Data is still being sent' + #10 +
                                   'Close anyway ?',
                                   'Warning', MB_YESNO) <> IDYES) then
            Exit;

        Display('Stop requested');
        if not WSocket1.AllSent then
            Display('Not all data has been sent');

        FAutoStart := 0;
        { Close the socket. This will delete any data not already sent to }
        { winsock.                                                        }
        PostMessage(Handle, WM_CLOSE_REQUEST, 0, LParam(WSocket1));

        Exit;
    end;

    { The user wants to start data transmission }
    CountLabel.Caption   := '';
    PauseButton.Caption  := '&Pause';
    PauseButton.Visible  := TRUE;
    ActionButton.Caption := '&Stop';
    FPaused              := FALSE;
    FSending             := TRUE;
    FFinished            := FALSE;
    FCount               := 0;

    { Setup final count }
    if ContCheckBox.Checked then
        FFinalCount := 0
    else
        FFinalCount := StrToInt(Trim(RepeatEdit.Text));

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品亚洲二区| 色婷婷香蕉在线一区二区| 一区二区视频免费在线观看| 26uuu欧美| 2020国产精品久久精品美国| 日韩欧美国产一二三区| 欧美视频中文一区二区三区在线观看| 91麻豆免费在线观看| 91麻豆国产自产在线观看| 91美女在线看| 在线观看国产一区二区| 欧美影院午夜播放| 欧美日韩国产一区二区三区地区| 欧美在线观看18| 欧美猛男男办公室激情| 在线综合视频播放| 日韩一区二区精品| 久久品道一品道久久精品| 国产视频一区二区在线观看| 国产喂奶挤奶一区二区三区| 久久精品视频免费| 亚洲欧美日韩一区| 午夜激情一区二区三区| 国产一区二区视频在线| av色综合久久天堂av综合| 欧美综合一区二区三区| 精品美女一区二区三区| 国产精品久久久久7777按摩| 亚洲激情av在线| 麻豆视频观看网址久久| 成人99免费视频| 欧美美女黄视频| 久久毛片高清国产| 亚洲一区视频在线观看视频| 麻豆成人久久精品二区三区红 | 制服丝袜av成人在线看| 久久久久久一二三区| 亚洲免费在线观看视频| 美日韩黄色大片| 91色九色蝌蚪| 久久青草欧美一区二区三区| 一区二区三区免费观看| 国产精品一区不卡| 欧美日韩视频在线观看一区二区三区| 精品美女在线播放| 亚洲国产视频直播| 成人福利在线看| 91精品国产91综合久久蜜臀| 一区二区中文视频| 久久av资源网| 欧美精品v日韩精品v韩国精品v| 亚洲精品一区二区三区四区高清 | 欧美综合亚洲图片综合区| 久久免费电影网| 日本vs亚洲vs韩国一区三区| 91美女福利视频| 国产精品区一区二区三区| 麻豆精品一区二区av白丝在线| 99在线精品观看| 欧美激情综合网| 国产综合色在线视频区| 欧美一级日韩一级| 亚洲国产一区二区三区| 在线亚洲一区观看| 亚洲少妇30p| 高清国产一区二区| 久久久久久久电影| 国产一区激情在线| 日韩一二在线观看| 美女高潮久久久| 日韩亚洲欧美高清| 日本aⅴ精品一区二区三区 | 日本不卡123| 欧美在线看片a免费观看| 亚洲毛片av在线| 色综合亚洲欧洲| 一区二区三区国产豹纹内裤在线 | 欧美日韩mp4| 亚洲成人一区二区在线观看| 在线视频一区二区三区| 玉足女爽爽91| 在线视频国内自拍亚洲视频| 亚洲女子a中天字幕| 色久综合一二码| 亚洲一二三级电影| 欧美一卡2卡3卡4卡| 蜜臀av一级做a爰片久久| 欧美成人精品1314www| 精品中文字幕一区二区小辣椒| 精品国产乱码久久久久久1区2区| 精品在线免费观看| 国产片一区二区三区| 91一区二区三区在线播放| 一区二区理论电影在线观看| 欧美老女人第四色| 久久99精品久久久久久国产越南 | 亚洲精品乱码久久久久| 欧美视频在线播放| 久久精品免费观看| 亚洲国产精华液网站w| 欧美性高清videossexo| 日本va欧美va瓶| 国产精品素人一区二区| 欧洲生活片亚洲生活在线观看| 日韩一区精品视频| 中文字幕精品在线不卡| 欧美特级限制片免费在线观看| 蜜乳av一区二区| 亚洲欧美一区二区久久| 欧美电视剧免费观看| 成人在线视频一区二区| 亚洲成人动漫av| 国产色爱av资源综合区| 欧美在线观看你懂的| 国产精品 日产精品 欧美精品| 一区二区三区视频在线看| 精品国产一区二区三区不卡| 成a人片国产精品| 日韩高清不卡一区二区三区| 国产欧美日韩视频在线观看| 欧美日韩国产大片| 国产一区二区精品久久99| 一区二区三区四区不卡视频| 久久久久久日产精品| 51精品视频一区二区三区| 99国产精品国产精品毛片| 欧美bbbbb| 午夜影院久久久| 综合在线观看色| 久久精品在线观看| 在线精品观看国产| 国产99久久久久| 久久精品国产亚洲5555| 亚洲成人综合视频| 亚洲综合另类小说| 中文字幕一区二区三区蜜月| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 亚洲精品美腿丝袜| 日本一区二区在线不卡| 精品欧美黑人一区二区三区| 欧美一三区三区四区免费在线看 | 欧美综合在线视频| 色嗨嗨av一区二区三区| 成人午夜视频网站| 色呦呦网站一区| thepron国产精品| 懂色一区二区三区免费观看| 国产一区二区福利视频| 精品在线一区二区三区| 卡一卡二国产精品| 国产麻豆精品95视频| 精东粉嫩av免费一区二区三区| 日本亚洲天堂网| 青青青伊人色综合久久| 青青青爽久久午夜综合久久午夜| 亚洲国产精品久久人人爱| 亚洲国产精品精华液网站| 亚洲午夜一区二区三区| 亚洲图片自拍偷拍| 日韩电影网1区2区| 免费黄网站欧美| 美女一区二区视频| 国产精品99久久久久久有的能看 | 亚洲日本在线视频观看| 国产精品初高中害羞小美女文| 欧美国产日本视频| 亚洲色图清纯唯美| 亚洲线精品一区二区三区 | 欧美成人一区二区三区在线观看| 欧美一卡2卡三卡4卡5免费| 精品噜噜噜噜久久久久久久久试看 | 亚洲午夜久久久久| 亚洲成人精品影院| 久久99精品国产91久久来源| 国产高清不卡一区二区| 97久久人人超碰| 欧美日韩国产天堂| 精品国产污污免费网站入口 | 国产一区二区伦理| 一本在线高清不卡dvd| 欧美日韩日日摸| www亚洲一区| 亚洲丝袜自拍清纯另类| 免费在线欧美视频| 欧美精选一区二区| 久久色.com| 亚洲一区二区三区在线| 精品一区二区三区不卡| 99热精品国产| 日韩一区二区电影| 亚洲精品美国一| 国产乱码精品一区二区三区忘忧草 | 亚洲女人的天堂| 日本亚洲视频在线| av综合在线播放| 精品久久久久久久久久久院品网 | 久久久久久久久久久电影| 亚洲男女一区二区三区| 国产美女一区二区三区| 欧美日韩国产另类一区|