Jump to content

AJ_Oldendorf

Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

0 Neutral

Technical Information

  • Delphi-Version
    Delphi 12 Athens

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. AJ_Oldendorf

    TCP Server + Client + Threaded and Bytes

    You are right, I forgot... var EOLData : AnsiString; begin EOLData := ''; SetLength(EOLData,Length(DefEOLB)); Move(DefEOLB[0],EOLData[1],Length(DefEOLB)); var EOLData : AnsiString; begin EOLData := ''; SetLength(EOLData,Length(DefEOLB)); Move(DefEOLB[0],EOLData[1],Length(DefEOLB)); LineEnd := EOLData; Now it works and ClientDataAvailable Event is called. One question, is the event everytime fired, when LineEnd is founded or can it happens, that the event is fired and in ReceiveStr is only a part of my message and I have to collect the received data?
  2. AJ_Oldendorf

    TCP Server + Client + Threaded and Bytes

    I take a look to OverbyteIcsSimpleSslServer and changed following: ClientDataAvailable found := False; tmpStr := ReceiveStr; tmpRcvdBytes := IcsStringToTBytes(tmpStr); EOL := False; for i := Low(tmpRcvdBytes) to High(tmpRcvdBytes) do begin if Found then Break; found := False; for j := Low(DefEOLB) to High(DefEOLB) do begin if tmpRcvdBytes[i] = DefEOLB[j] then begin found := True; end else found := False; if (j = High(DefEOLB)) and found then begin FoundPos := i; EOL := True; Break; end; end; end; if EOL then begin if Length(LastServerFracInputBytes) > 0 then begin RcvdBytes := LastServerFracInputBytes + tmpRcvdBytes; SetLength(LastServerFracInputBytes, 0); end else begin RcvdBytes := tmpRcvdBytes; end; Display('Received from ' + GetPeerAddr + ': ', RcvdBytes); ProcessData(Sender as TTcpSrvClient); end else begin LastServerFracInputBytes := LastServerFracInputBytes + tmpRcvdBytes; end; LastServerFracInputBytes : TBytes; DefEOLB : TBytes; are global variables in form. FormCreate SetLength(LastServerFracInputBytes, 0); SetLength(DefEOLB, 8); FillChar(DefEOLB[0], 1, 65); FillChar(DefEOLB[1], 1, 65); FillChar(DefEOLB[2], 1, 66); FillChar(DefEOLB[3], 1, 66); FillChar(DefEOLB[4], 1, 67); FillChar(DefEOLB[5], 1, 67); FillChar(DefEOLB[6], 1, 68); FillChar(DefEOLB[7], 1, 68); StartButton SslWSocketServer1.Proto := 'tcp'; SslWSocketServer1.Addr := '0.0.0.0'; // Use any interface SslWSocketServer1.Port := PortEdit.Text; SslWSocketServer1.SslEnable := FALSE; SslContext1.SslCertFile := CertFileEdit.Text; SslContext1.SslPassPhrase := PassPhraseEdit.Text; SslContext1.SslPrivKeyFile := PrivKeyFileEdit.Text; SslContext1.SslCAFile := CAFileEdit.Text; SslContext1.SslCAPath := CAPathEdit.Text; SslContext1.SslVerifyPeer := VerifyPeerCheckBox.Checked; //SslWSocketServer1.SetAcceptableHostsList(AcceptableHostsEdit.Text); SslWSocketServer1.Listen; SslWSocketServer1.ClientClass := TTcpSrvClient; // Use our component Display('Listenning...'); ClientConnect with Client as TTcpSrvClient do begin Display('Client connected.' + ' Remote: ' + PeerAddr + '/' + PeerPort + ' Local: ' + GetXAddr + '/' + GetXPort); Display('There is now ' + IntToStr(TWSocketServer(Sender).ClientCount) + ' clients connected.'); LineMode := TRUE; LineEdit := TRUE; LineLimit := 50; { Do not accept long lines } OnDataAvailable := ClientDataAvailable; OnLineLimitExceeded := ClientLineLimitExceeded; OnBgException := ClientBgException; OnSslVerifyPeer := ClientVerifyPeer; ConnectTime := Now; end; So, my client connect and I got message, that one is client is connected. When LineLimit is 50, I got "ClientLineLimitExceeded" event after some second and connection will closed. When LineLimit is 62000, no event is calling (or ClientLineLimitExceeded takes a long time...). All the time, no ClientDataAvailable is called. Do you have a idea?
  3. AJ_Oldendorf

    TCP Server + Client + Threaded and Bytes

    This demo look likes UDP, yes? I want to use TCPIP, so packages will transfered without loosing (if no connection dropped) and repeat in case of trouble. Actual I send the complete length of my message at the beginning of each message and receiver can check when EndOfLine is True, if collected input message length is the same like sender has set in message data. If true, I accept the incomming message and works with it. The OverbyteIcsIpStmLogTst demo looks like a file transfer. In my opinion the demo OverbyteIcsThrdSrv looks like better but I have the problem, to understand how to transfer TBytes (ok, I saw the procedure SendTB with parameter TBytes) but how can I set the LineEnd to fix 8bytes and get a information in receive event, that EndOfLine is reached or not?
  4. Hello together, actual I use nsoftware with TCPIP. I have a application as Server and one application as client. Clients can be in network more than one pc (maximum 15 different pcs with one client application). My server wait for a connect from one client and when client don't disconnect they send everytime data to the client. The transfer rate from server to client is ~80-90 different messages per second with different length (from 20 bytes to 60000 bytes) to each client as TBytes with 8 fix bytes at every end as EndOfLine terminator. Client receive data as TBytes with information if EndOfLine is True or not. If not, i collect the data in DataIn-event of client till EndOfLine is received. Than I know the complete message block. The transfer rate from client to server is ~20 different messages per second with different length (from 20 bytes to 60000 bytes) to server as TBytes with 8 fix bytes at every end as EndOfLine terminator. Server receive data as TBytes with information if EndOfLine is True or not. If not, i collect the data in DataIn-event of server till EndOfLine is received. Than I know the complete message block. This works with nsoftware ^^ Now I'm thinking about to change to ICS and have some questions. At first, is my above-mentioned task possible with ICS? In demo application I saw only, that Strings are send and receive and EndOfLine character is a String too. Is it possible to do all with TBytes and if yes, is there a demo application for server and client to take a look at this? All I want to program in background thread, not in main GUI :-)
  5. AJ_Oldendorf

    wuppdi Welcome Page for Delphi 11 Alexandria?

    It is very interesting. Actual i can't reproduce the error. I have installed your plugin again and it works with all other plugins. I'm confused. I will take a look on this. I don't do any update of TMS or anything else. When problem occurs again, i will try the demo you told me
  6. AJ_Oldendorf

    wuppdi Welcome Page for Delphi 11 Alexandria?

    I'm confused and don't understand, what the plugin do that TMS will raise a exception. Maybe @gkobler and me will find time, to investigate more in this to find the problem. For now, without plugin it works for me but default welcome page is not really useable :-(
  7. AJ_Oldendorf

    wuppdi Welcome Page for Delphi 11 Alexandria?

    I tested it with a clean Delphi installation and only installed TMS VCL UI Pack 13.0.5.0. Then the welcome page and with that I was able to generate the error immediately. If I remove the welcome page again, the error does not occur with TMS. TMS itself says that you can investigate this for a fee, as the error does not occur if no "third-party components"/"third-party plugins" are installed. Is it possible that TMS and you use a same ressource or something?
  8. AJ_Oldendorf

    wuppdi Welcome Page for Delphi 11 Alexandria?

    Maybe something different to TMS components or Delphi adjustments? I use this TMS version: TMS VCL UI Pack 13.0.5.0 Delphi application i start with -np Delphi parameter Delphi Welcome Page a modify layout that all other things are closed (get it, learning, last projects etc) Only your welcome page should shown. If it is helpful, we can contact directly together to analyze more difference. I test it with a clean installed delphi 12 from iso file Yes, it is right. Select Pager and press Ctrl+C, than i got the exception from Delphi with attached stack trace
  9. AJ_Oldendorf

    wuppdi Welcome Page for Delphi 11 Alexandria?

    @gkobler Sounds good, many thanks. When you have TMS components, i attach a demo project where you can see the problem very easy. If you need further informations, let me know. AdvPager-Bug-D12.zip
  10. AJ_Oldendorf

    wuppdi Welcome Page for Delphi 11 Alexandria?

    I find a problem with newest version of your plugin, Delphi 12 and newest TMS VCL UI Pack 13.0.5.0 I have a demo project with 3 TMS components and when i want to copy this components, Delphi occurs a exception. When i want to close the unit, Delphi occurs a exception. This happens only with forms which have a AdvOfficePager component. When i deinstall your plugin, it don't occurs. When i install it again, it occurs. I already send stacktrace to TMS, they say that problem don't happen without your plugin, so it is the problem of TMS. They can investigate time but i have to pay. Can you take a look, if you can find something with TMS components (maybe try the demo) or if you can find something in your plugin? If you need more informations, let me know StackTrace.txt
×