亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产欧美精品一区二区色综合朱莉| 2欧美一区二区三区在线观看视频| 国产三级久久久| 欧美一卡二卡三卡| 成人高清在线视频| 视频一区欧美日韩| 中文字幕国产一区| 6080国产精品一区二区| 国内不卡的二区三区中文字幕| 中文字幕欧美一| 欧美草草影院在线视频| 亚洲精品国产a| 欧美日韩亚洲综合| 国产成人综合亚洲91猫咪| 亚洲成人动漫精品| 国产精品美日韩| 精品人在线二区三区| 久久亚洲免费视频| 日韩理论电影院| 国产日韩v精品一区二区| 国产精品无码永久免费888| 日本一区二区不卡视频| 国产日韩欧美制服另类| 久久中文娱乐网| 日本一区免费视频| 亚洲免费观看高清完整| 国产精品短视频| 欧美经典一区二区| 日韩毛片视频在线看| 一区二区三区四区不卡在线| 国产精品久久久久一区二区三区共| 日韩码欧中文字| 日本视频在线一区| 日一区二区三区| 国产毛片精品视频| 国产乱子伦一区二区三区国色天香| 亚洲欧洲另类国产综合| 天天av天天翘天天综合网| 亚洲综合视频在线观看| 亚洲私人影院在线观看| 全国精品久久少妇| 秋霞午夜鲁丝一区二区老狼| 成人综合在线观看| 91在线一区二区| 成人app在线| 日韩欧美国产一区二区三区| 精品国产三级a在线观看| 久久婷婷色综合| 亚洲大片免费看| 91在线播放网址| 色av成人天堂桃色av| 欧美三级资源在线| 国产精品久久久久永久免费观看 | 国产精品小仙女| 欧美综合在线视频| 欧美日韩精品福利| 日韩视频免费观看高清在线视频| 91精彩视频在线| 国产视频一区二区三区在线观看| 国产精品沙发午睡系列990531| 天堂一区二区在线免费观看| 91国偷自产一区二区开放时间| 国产欧美日韩久久| 国产精品一二三区| 日韩欧美黄色影院| 日韩精品一区第一页| 欧美日韩精品电影| 久久久久97国产精华液好用吗| 精品国产乱码久久久久久牛牛| 亚洲午夜久久久久| 国产美女一区二区| 欧美成人猛片aaaaaaa| 日本sm残虐另类| 日韩欧美中文字幕精品| 日韩av一区二区在线影视| 欧美精品在线一区二区| 国产拍揄自揄精品视频麻豆| 国产剧情在线观看一区二区| 久久综合久久综合久久综合| 国产一区二区毛片| 国产精品久久久久影院亚瑟 | 欧美精品1区2区3区| 亚洲一区在线看| 欧美日韩你懂的| 午夜伦理一区二区| 日韩一区二区三区av| 国内久久精品视频| 国产日韩高清在线| 色综合网站在线| 久久精品亚洲精品国产欧美kt∨| 激情欧美日韩一区二区| 久久精品视频一区二区三区| www.亚洲免费av| 精品伦理精品一区| 国产成人激情av| 亚洲猫色日本管| 欧美日韩精品欧美日韩精品| 蜜桃久久精品一区二区| 99久久精品免费看国产| 亚洲精品成人精品456| 欧美色爱综合网| 国产精品一区2区| 亚洲四区在线观看| 日韩小视频在线观看专区| 国产在线国偷精品产拍免费yy| 国产精品久久久久久久午夜片| 色偷偷一区二区三区| 欧美国产成人在线| 91久久精品日日躁夜夜躁欧美| 亚洲国产裸拍裸体视频在线观看乱了| 91精品国产乱码| 狠狠狠色丁香婷婷综合激情 | 中文字幕一区av| 欧美一卡二卡在线观看| 99精品视频在线播放观看| 视频一区在线播放| 精品精品欲导航| 欧日韩精品视频| 福利电影一区二区三区| 精品国产人成亚洲区| 91久久人澡人人添人人爽欧美| 久久国内精品视频| 欧美日韩国产一区二区三区地区| 午夜久久久久久久久| 欧美精品一区二区三区四区| 91亚洲精品久久久蜜桃网站 | 国产精品入口麻豆原神| 欧美色欧美亚洲另类二区| 国产精品一二三| 蜜桃视频第一区免费观看| 18欧美亚洲精品| 国产视频在线观看一区二区三区| 在线综合视频播放| 91激情在线视频| 成人免费视频一区| 国产精品一区不卡| 黑人精品欧美一区二区蜜桃| 天天综合色天天综合| 亚洲欧美激情视频在线观看一区二区三区| 精品国产三级a在线观看| 日韩欧美一级二级| 91精品国产美女浴室洗澡无遮挡| 欧美性高清videossexo| 亚洲特黄一级片| 国产精品久久影院| 国产精品日日摸夜夜摸av| 国产亚洲美州欧州综合国| 日韩精品影音先锋| 日韩欧美一区在线观看| 日韩一区国产二区欧美三区| 8x福利精品第一导航| 欧美一区二区视频观看视频 | 玖玖九九国产精品| 日本美女一区二区三区| 青青青伊人色综合久久| 三级亚洲高清视频| 日韩国产精品久久久久久亚洲| 天天综合日日夜夜精品| 亚洲国产精品久久久男人的天堂| 1000精品久久久久久久久| 国产午夜精品理论片a级大结局| 亚洲精品在线电影| 久久久国产一区二区三区四区小说| 2020国产精品久久精品美国| 日韩免费性生活视频播放| www国产亚洲精品久久麻豆| 国产日韩成人精品| 亚洲视频免费看| 亚洲成av人片一区二区三区| 日韩精品一级二级 | 欧美精品第1页| 欧美大白屁股肥臀xxxxxx| 久久久午夜精品| 国产精品高清亚洲| 亚洲成a人在线观看| 毛片一区二区三区| 本田岬高潮一区二区三区| 欧洲精品一区二区三区在线观看| 欧美精品在线观看一区二区| 26uuu亚洲综合色| 亚洲人成在线播放网站岛国| 日韩高清在线一区| 国产精品77777竹菊影视小说| 91色九色蝌蚪| 日韩一区二区精品葵司在线| 欧美激情综合在线| 亚洲v中文字幕| 国产成人午夜高潮毛片| 欧美日韩一本到| 综合久久综合久久| 亚洲色图欧洲色图| 天堂一区二区在线| 高清国产一区二区| 欧美年轻男男videosbes| 国产日韩欧美一区二区三区综合| 亚洲三级理论片| 激情综合色播激情啊| 色哟哟国产精品免费观看| 久久精品人人爽人人爽| 亚洲高清三级视频|