uses Data.DBXTransport; //ServerContainer procedure TServerContainer.DSServer1Connect(DSConnectEventObject: TDSConnectEventObject); var ci: TDBXClientInfo; ClientID: Integer; begin ci := DSConnectEventObject.ChannelInfo.ClientInfo; ClientID := DSConnectEventObject.ChannelInfo.Id; FrmMain.getUser(IntToStr(ClientID), DateTimeToStr(Now), ci.IpAddress, ci.ClientPort); end; //FrmMain procedure TFrmMain.getUser(strID, strDateTime, strIP, strPort: string); var item: TListItem; begin ListView1.Items.BeginUpdate; item := ListView1.Items.Add; item.Caption := strDateTime; item.SubItems.Add(strID); item.SubItems.Add(strIP); item.SubItems.Add(strPort); ListView1.Items.EndUpdate; end;
localhost是网页访问rest服务