Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Record or class(TIdPeerThread) on TcpServer



Permlink Replies: 1 - Last Post: May 4, 2016 3:07 PM Last Post By: Remy Lebeau (Te...
douglas ruiz

Posts: 1
Registered: 11/13/10
Record or class(TIdPeerThread) on TcpServer
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 4, 2016 1:53 PM
Hello, i'm with a problem.
Now i'm using class(TIdPeerThread) from Remy Lebeau from this my topic: http://stackoverflow.com/questions/36605995/tcpserver-cant-accept-more-connections-after-some-days
but always i got access violation, or if my client disconnect on my execute i have error again.

and with this code i can't use Sync to show details on memo like this:

with TSyncClass.Create do
try
FData := Format('%s : [%s][%s] has disconnected', [TimeToStr(Now), IP, Serial]);
DoSynchronize(AThread,UpdateVCL);
finally
Free;
end;}
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Record or class(TIdPeerThread) on TcpServer
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 4, 2016 3:07 PM   in response to: douglas ruiz in response to: douglas ruiz
douglas wrote:

Now i'm using class(TIdPeerThread) from Remy Lebeau from this my topic:
http://stackoverflow.com/questions/36605995/

but always i got access violation

Then you are doing something wrong. Please show your actual code.

or if my client disconnect on my execute i have error again.

What kind of error exactly? An access violation? Or something else? You
should usually be getting a socket-related exception when the client disconnects.
Let the server handle it so it can close the socket and stop the thread
that manages the socket.

and with this code i can't use Sync to show details on memo like this:

Why not? What is the problem you are having with using it? You need to
be more specific.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02