Recent

Author Topic: lNet Count property  (Read 5776 times)

nik_pc

  • New Member
  • *
  • Posts: 10
lNet Count property
« on: April 05, 2010, 02:52:59 pm »
Hi all,
i'm trying to create a simple client-server program, showing on the server how many clients are connected. To do this i'm using the Count property of the lNet component. When each client connects, the Count property on the server increase by 1, and all is ok. But when the clients disconntecs (using the Disconnect method, as shown in the sample lNet application), the Count property don't decrease. There's something i'm missing, or is a bug?

I'm using the latest lNet version (0.6.3).

Nik

nik_pc

  • New Member
  • *
  • Posts: 10
Re: lNet Count property
« Reply #1 on: April 09, 2010, 07:43:26 pm »
I found the solution by myself. Simply, firing the Disconnect method, I had to put this:

aSocket.Disconnect;

I thought that the component would disconnect the connection by itself, but this won't happens. Forcing the aSocket to disconnect, the Count property is finally set correctly.

Nik

Almindor

  • Sr. Member
  • ****
  • Posts: 412
    • http://www.astarot.tk
Re: lNet Count property
« Reply #2 on: May 06, 2010, 05:10:12 pm »
Hmm I'll have to look into this, sounds like you found a bug   :-\

I am not able to get the same result. if I disconnect my count goes down.

Did you use some special code or the visual tcpudp example (it works with that for me)

Thanks
« Last Edit: May 06, 2010, 05:34:11 pm by Almindor2 »

 

TinyPortal © 2005-2018