Info about thread


(bachirkallas .) #1

I Need some info about remoting SDK…

  1. how works TCP autoreconnect?
    I have test It sometimes but when i make Active = true to client and server is down client doesn t reconnect automatically.
  2. remoting SDK support multithreading? When try to connect client to server(your chat demo) It try to connect in main thread so doesn t update other component.
  3. i have also interface class (com object) Can i trasfer It from client to server?

BR,Alessandro


(antonk) #2

What is the target platform (.NET, Delphi, Java, JS, etc)?


(marc hoffman) #3

Delphi, i believe from previous correspondence.


(bachirkallas .) #4

Yes Delphi Tokyo 10.2.2


(bachirkallas .) #5

Nobody answer me?


(EvgenyK) #6

TROIndyTCPChannelchannel hasn’t Active property. probably you are using SuperTCP channel. TROSuperTCPChannel channel has AutoReconnect property. Check that it is set to True

Yes, It supports. You can create several threads and perform execution of server method from it. see MegaDemo sample where it launches stress tests in XX threads.

You cannot transfer COM object from client to server, but you can create a wrapper for this com object (TROComplexType descendant) and pass it to server.


(bachirkallas .) #7

TROIndyTCPChannelchannel hasn’t Active property. probably you are using SuperTCP channel. TROSuperTCPChannel channel has AutoReconnect property. Check that it is set to True

I have autoreconnect = true but doesn t reconnect …

You cannot transfer COM object from client to server, but you can create a wrapper for this com object (TROComplexType descendant) and pass it to server.

Ok but what is difference between to use serialize or to use tarray ?


(EvgenyK) #8

can you create a simple testcase, that reproduces this case, pls?

can you rephrase your question, pls?


(Alessandro) #9

ok reconnect works… How can I remove dialog no connection available?


(Alessandro) #10

After Reconnect 3 times I got erro 10038 socket error … why?


(Alessandro) #11

Follow this steps…

  • Open superchanneltcpchat demo.
  • Start Server
  • Start Client
  • Login Client with server and write ‘Hello’ in chat text editor
  • Close Server with X
  • Login Client with server(Server is closed)
  • First Message “No connection Avaiable”
  • Press OK
  • Second message socket error and app Hang

(EvgenyK) #12

I’ve set AutoReconnect property and followed to your steps.

I can’t reproduce this step:


(Alessandro) #13

I have this problem I don t know how fix it…
Windows 10 64 bit
RO SDK 9.3.105.1351
Demo supertcpchanneldemo
Delphi 10.2 update 2


(EvgenyK) #14

if you replace SuperTCP (i.e. Indy-based) components with Synapse-based components (TROSynapseSuperTCPChannel & TROSynapseSuperTCPServer), will it improve situation?

Note: These components are interchangeable


(Alessandro) #15

Same Problem…

I need to fix it … I can t use it … so if it doesn t works I will ask you a full refund…

Can you send me supertcp compiled on your side

so I can test it?


(EvgenyK) #16

can you attach your modified project and specify version of Delphi which should be used for compiling


(Alessandro) #17

Hi!

this is project with exe included

Br,Alessandro
Delphi 10.2 update 2SuperTCP Channel Chat.rar (2.0 MB)


(EvgenyK) #18

I’ve updated your testcase:
SuperTCP Channel Chat.zip (67.6 KB)

TROSuperTcpChannel.OnException event is called from background thread and processing it via main thread in GUI (i.e. ShowMessage) causes some problems so error message is added to log directly.
If you launch server, client will work as expected.


(Alessandro) #19

Ok now works but reconnection is in Main Thread…so it possible to have in background Thread?


(EvgenyK) #20

You can use asynchronous login, but in this case AutoReconnect won’t work.
it could be something like

  //lLoginEx := CoLoginService_AsyncEx.Create(ROMessage, ROChannel);
  lLoginEx.BeginLogin(aUsername, LoginCallback, Self);