zoukankan      html  css  js  c++  java
  • datasnap的监督功能【1】-服务端获取客户端连接信息

    在服务端获取连接的客户端相关info:

    TDBXClientInfo = recoed
        IpAddress : String;
        ClientPort : String;
        Protocol : String;
        AppName : String;//web客户端才有此参数
    end
    TDBXClientInfo 通过TDSConnectionEventObject对象。
    TDSConnectionEventObject对象是TDSServer.OnConnect事件处理函数的参数
    procedure TServerContainer.DSServerConnect(DSConnectEventObject : TDSConnectEventObject);
    var
       sb : TStringBuilder;    
    begin
        sb := TStringBuilder.Create;
        try
           sb.Append('AppName:'+DSConnectEventObject.ChannelInfo.ClientInfo.AppName); 
        sb.Append('Protocol:'+DSConnectEventObject.ChannelInfo.ClientInfo.Protocol);
        sb.Append('IpAddress:'+DSConnectEventObject.ChannelInfo.ClientInfo.IpAddress);  
        sb.Append('ClientPort:'+DSConnectEventObject.ChannelInfo.ClientInfo.ClientPort); 
        showmessage(sb.ToString);
    finally sb.free; end; end;
  • 相关阅读:
    ZOJ Problem Set
    ZOJ Problem Set
    UVa 11464 偶数矩阵 枚举
    poj 1753 枚举
    Codeforces 637D 模拟
    hdu 5631 并查集
    hdu 5438 并查集
    UVa 10129 单词 (有向欧拉路+并查集)
    hdu 3018 欧拉路定理+并查集
    并查集的初步学习
  • 原文地址:https://www.cnblogs.com/usegear/p/13539861.html
Copyright © 2011-2022 走看看