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

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

?? wsockets.pas

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

Author:       Fran鏾is PIETTE
Description:  A TWSocket that has server functions: it listen to connections
              an create other TWSocket to handle connection for each client.
Creation:     Aug 29, 1999
Version:      1.04
EMail:        http://users.swing.be/francois.piette  francois.piette@swing.be
              http://www.rtfm.be/fpiette             francois.piette@rtfm.be
              francois.piette@pophost.eunet.be
Support:      Use the mailing list twsocket@rtfm.be See website for details.
Legal issues: Copyright (C) 1996-2000 by Fran鏾is PIETTE
              Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56
              <francois.piette@pophost.eunet.be><francois.piette@swing.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.

              4. You must register this software by sending a picture postcard
                 to the author. Use a nice stamp and mention your name, street
                 address, EMail address and any comment you like to say.

Quick reference guide:
TWSocketServer will normally be used to listen on a given tcp port. When a
client connect, it will instanciate a new TWSocketClient component to handle
communication with client. Normally you will derive your own component from
TWSocketClient to add private data and methods to handle it. You tell
TWSocketServer which component it has to instanciate using ClientClass
property. You have to initialize instances from OnClientConnect event handler.
TWSocketServer maintain a list of connected clients. You can access it using
Client[] indexed property and ClientCount property.

History:
Sep 05, 1999 V1.01 Adpted for Delphi 1
Oct 09, 1999 V1.02 Added intermediate class TCustomWSocket
Nov 12, 1999 V1.03 Added OnClientCreate event just after client component has
                   been created.
Apr 02, 2000 V1.04 Added FSessionClosedFlag to avoid double SessionClosed
                   event triggering

 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
unit WSocketS;

interface

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

const
    WSocketServerVersion     = 104;
    CopyRight : String       = ' TWSocketServer (c) 1999-2000 F. Piette V1.04 ';
    WM_CLIENT_CLOSED         = WM_USER + 30;

type
    TCustomWSocketServer = class;
    TWSocketClient = class;
    TWSocketClientClass = class of TWSocketClient;

    TWSocketClientCreateEvent  = procedure (Sender : TObject;
                                            Client : TWSocketClient) of object;

    TWSocketClientConnectEvent = procedure (Sender : TObject;
                                            Client : TWSocketClient;
                                            Error  : Word) of object;

    { TWSocketClient is used to handle all client connections.           }
    { Altough you may use it directly, you'll probably wants to use your }
    { own derived component to add data and methods suited to your       }
    { application.                                                       }
    { If you use a derived component, then assign it's class to          }
    { TWSocketServer ClientClass property.                               }
    TWSocketClient = class(TWSocket)
    protected
        FBanner            : String;
        FServer            : TCustomWSocketServer;
        FPeerAddr          : String;
        FPeerPort          : String;
        FSessionClosedFlag : Boolean;
    public
        procedure   StartConnection; virtual;
        procedure   TriggerSessionClosed(Error : Word); override;
        procedure   Dup(newHSocket : TSocket); override;
        function    GetPeerAddr: String; override;
        function    GetPeerPort: String; override;
        property    Server : TCustomWSocketServer read  FServer
                                                  write FServer;
    published
        property Banner : String           read  FBanner
                                           write FBanner;
    end;

    { TWSocketServer is made for listening for tcp client connections.      }
    { For each connection, it instanciate a new TWSocketClient (or derived) }
    { to handle connection. Use ClientClass to specify your derived.        }
    TCustomWSocketServer = class(TWSocket)
    protected
        FBanner                 : String;
        FBannerToBusy           : String;
        FClientClass            : TWSocketClientClass;
        FClientList             : TList;
        FClientNum              : LongInt;
        FMaxClients             : LongInt;
        FOnClientCreate         : TWSocketClientCreateEvent;
        FOnClientConnect        : TWSocketClientConnectEvent;
        FOnClientDisconnect     : TWSocketClientConnectEvent;
        procedure WndProc(var MsgRec: TMessage); override;
        procedure Notification(AComponent: TComponent; operation: TOperation); override;
        procedure TriggerSessionAvailable(Error : Word); override;
        procedure TriggerClientCreate(Client : TWSocketClient); virtual;
        procedure TriggerClientConnect(Client : TWSocketClient; Error : Word); virtual;
        procedure TriggerClientDisconnect(Client : TWSocketClient; Error : Word); virtual;
        function  GetClientCount : Integer; virtual;
        function  GetClient(nIndex : Integer) : TWSocketClient; virtual;
        procedure WMClientClosed(var msg: TMessage);
                                 message WM_CLIENT_CLOSED;
    public
        constructor Create(AOwner: TComponent); override;
        destructor  Destroy; override;
        { Check  if a given object is one of our clients }
        function  IsClient(SomeThing : TObject) : Boolean;
    protected
        { TWSocketClient derived class to instanciate for each client }
        property  ClientClass            : TWSocketClientClass
                                                      read  FClientClass
                                                      write FClientClass;
        { How many active clients we currently have }
        property  ClientCount   : Integer             read  GetClientCount;
        { Client[] give direct access to anyone of our clients }
        property  Client[nIndex : Integer] : TWSocketClient
                                                      read  GetClient;
    published
        { Banner sent to client as welcome message. Can be empty. }
        property  Banner                 : String     read  FBanner
                                                      write FBanner;
        property  BannerToBusy           : String     read  FBannerToBusy
                                                      write FBannerToBusy;
        property  MaxClients             : LongInt    read  FMaxClients
                                                      write FMaxClients;
        { Triggered when a client disconnect }
        property  OnClientDisconnect     : TWSocketClientConnectEvent
                                                      read  FOnClientDisconnect
                                                      write FOnClientDisconnect;
        { Triggerred when a new client is connecting }
        property  OnClientConnect        : TWSocketClientConnectEvent
                                                      read  FOnClientConnect
                                                      write FOnClientConnect;
        { Triggerred when a new client component has been created }
        property  OnClientCreate         : TWSocketClientCreateEvent
                                                      read  FOnClientCreate
                                                      write FOnClientCreate;
    end;

    TWSocketServer = class(TCustomWSocketServer)
    public
        property  ClientClass;
        property  ClientCount;
        property  Client;
    published
        property  Banner;
        property  BannerToBusy;
        property  MaxClients;
        property  OnClientDisconnect;
        property  OnClientConnect;
    end;

procedure Register;

implementation


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure Register;
begin
    RegisterComponents('FPiette', [TWSocketServer]);
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
constructor TCustomWSocketServer.Create(AOwner: TComponent);
begin
    inherited Create(AOwner);
    FClientList      := TList.Create;
    FClientClass     := TWSocketClient;
    FBanner          := 'Welcome to TcpSrv';
    FBannerToBusy    := 'Sorry, too many clients';
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
destructor TCustomWSocketServer.Destroy;
var
    I : Integer;
begin
    if Assigned(FClientList) then begin
        { We need to destroy all clients }
        for I := FClientList.Count - 1 downto 0 do begin
            try
                TWSocketClient(FClientList.Items[I]).Destroy;
            except
                { Ignore any exception here }
            end;
        end;
        { Then we can destroy client list }
        FClientList.Free;
        FClientList := nil;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品久久久久久久久| 99精品欧美一区二区三区综合在线| 国产成人aaa| 欧美日本高清视频在线观看| 国产精品丝袜在线| 美女视频黄免费的久久 | 国产很黄免费观看久久| 欧美亚洲综合网| 日韩美女精品在线| 国产suv精品一区二区三区| 日韩美女视频在线| 午夜精品久久久久久久99樱桃| 99久精品国产| 日本一区二区免费在线| 国产一区二区三区香蕉| 欧美一二三区在线观看| 丝袜诱惑亚洲看片| 欧美手机在线视频| 一区二区三区中文字幕电影| 成人18视频在线播放| 国产日韩欧美激情| 国产福利精品一区二区| 2023国产精品视频| 久久国产麻豆精品| 日韩欧美黄色影院| 麻豆免费看一区二区三区| 欧美一区二区久久| 日本免费新一区视频| 欧美日本国产一区| 免费国产亚洲视频| 精品区一区二区| 精品一区二区三区在线观看国产| 日韩一区二区免费在线电影| 免费高清不卡av| 精品久久久久香蕉网| 国产精品一二三在| 中文字幕电影一区| 91在线观看下载| 亚洲免费观看高清完整版在线观看 | 国产精品少妇自拍| 成人av在线一区二区| 综合色中文字幕| 欧美性大战久久久久久久蜜臀| 亚洲最快最全在线视频| 欧美日高清视频| 国模冰冰炮一区二区| 国产人久久人人人人爽| 99久久久久久99| 亚洲v日本v欧美v久久精品| 91精品婷婷国产综合久久| 久久99热这里只有精品| 国产日韩一级二级三级| 色噜噜偷拍精品综合在线| 亚洲成人手机在线| 久久夜色精品国产噜噜av| 成人av在线看| 亚洲mv在线观看| 久久久久久久综合| 日本韩国欧美一区二区三区| 日韩精品一二三四| 久久久久久久久久久久久夜| 色综合天天综合在线视频| 天天av天天翘天天综合网| 久久亚洲免费视频| 色婷婷久久99综合精品jk白丝| 日韩va欧美va亚洲va久久| 国产午夜精品一区二区| 欧美在线短视频| 国产精品一区一区三区| 一区二区三区四区不卡视频 | 免费看精品久久片| 亚洲四区在线观看| 久久综合久久久久88| 欧美三级三级三级爽爽爽| 国产美女在线精品| 图片区日韩欧美亚洲| 国产精品视频九色porn| 日韩视频一区二区| 色狠狠av一区二区三区| 国产剧情一区二区三区| 亚洲18色成人| 亚洲欧美日韩综合aⅴ视频| 欧美电影免费提供在线观看| 91麻豆产精品久久久久久| 国产伦精品一区二区三区在线观看| 亚洲老司机在线| 欧美国产视频在线| 精品国产精品网麻豆系列| 欧美日韩午夜精品| 欧美亚洲动漫精品| 91偷拍与自偷拍精品| 国产成人亚洲综合a∨猫咪| 天堂资源在线中文精品| 亚洲午夜一区二区| 亚洲激情一二三区| 亚洲欧美日韩人成在线播放| 欧美激情一区三区| 国产欧美一二三区| 久久综合五月天婷婷伊人| 欧美一级国产精品| 欧美久久久一区| 欧美日韩高清一区二区| 欧洲精品在线观看| 欧美午夜不卡视频| 欧洲一区二区三区免费视频| 91亚洲永久精品| 色综合天天综合在线视频| 99re热这里只有精品免费视频| 成人丝袜18视频在线观看| 国产成人精品亚洲午夜麻豆| 国产乱一区二区| 另类中文字幕网| 狠狠色丁香婷综合久久| 国产精品综合二区| 成人激情电影免费在线观看| 成人av网站免费观看| 成人精品免费看| 菠萝蜜视频在线观看一区| av亚洲精华国产精华精华| 91在线精品一区二区| 欧亚洲嫩模精品一区三区| 欧美色综合久久| 日韩免费性生活视频播放| 日韩三级高清在线| 久久久久国产精品麻豆| 国产精品美女www爽爽爽| 亚洲丝袜美腿综合| 亚洲影院久久精品| 蜜臀av一区二区在线观看| 狠狠色狠狠色综合| 不卡的电视剧免费网站有什么| 日本精品裸体写真集在线观看| 91国偷自产一区二区开放时间| 欧美日韩国产综合久久| 精品国精品国产| 中文字幕日韩av资源站| 亚洲成人www| 国产黄色91视频| 欧洲精品在线观看| 久久伊人中文字幕| 亚洲精品成人在线| 美女mm1313爽爽久久久蜜臀| 成人一区二区三区在线观看| 欧美午夜一区二区| 久久久久久电影| 亚洲电影你懂得| 国产福利91精品一区| 欧美三级电影在线观看| 久久婷婷色综合| 亚洲综合区在线| 国产综合色在线视频区| 色综合色狠狠综合色| 精品国产91乱码一区二区三区| 1区2区3区精品视频| 秋霞电影网一区二区| 99久久精品情趣| 日韩精品一区二区三区视频| 亚洲欧美一区二区在线观看| 青青草成人在线观看| 成人av片在线观看| 亚洲精品一区二区三区在线观看| 中文字幕五月欧美| 国产在线视频一区二区三区| 欧美亚洲国产怡红院影院| 久久久久久久久久久黄色| 无码av免费一区二区三区试看| 成人理论电影网| 久久综合久久综合亚洲| 日韩中文字幕亚洲一区二区va在线| 国产成人免费视频网站 | 91久久精品网| 国产日韩影视精品| 免费看日韩精品| 欧美久久一二区| 一区二区在线观看av| 成人高清免费在线播放| 日韩精品一区国产麻豆| 视频一区二区欧美| 欧美午夜寂寞影院| 亚洲男人的天堂一区二区| 国产成人av一区二区| 精品久久久久久久一区二区蜜臀| 午夜精品在线看| 欧美日精品一区视频| 一区二区三区四区在线| 91极品视觉盛宴| 亚洲人成网站色在线观看| 99久久综合色| 国产精品高潮久久久久无| 成人午夜视频在线| 日本一区二区三区电影| 国产高清在线精品| 亚洲国产精品传媒在线观看| 国产高清在线观看免费不卡| 久久毛片高清国产| 国产乱码精品1区2区3区| 国产区在线观看成人精品| 国产成人午夜视频| 欧美国产视频在线| 99re热这里只有精品免费视频|