NetTalk Central

Author Topic: NetRefresh & error 29  (Read 21622 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
NetRefresh & error 29
« on: February 20, 2009, 07:29:40 AM »
Hi,
In some PC´s, at some clientes and not allways... :-)
Error -29 too many sending sockets
How to avoid it?

And...

Any Way to DIsable NetRefresh at runtime??

Thanks
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetRefresh & error 29
« Reply #1 on: February 22, 2009, 05:00:27 AM »
There is a property
.noRefreshes
you can set. This will turn off NetRefresh.

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NetRefresh & error 29
« Reply #2 on: February 25, 2009, 08:03:37 AM »
Bruce,

And I set this property where?
If I want to disconnect the refresh for all the application...
Do I need to set it in every procedure?

THanks
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetRefresh & error 29
« Reply #3 on: February 25, 2009, 09:55:29 PM »
The netrefresh object is global, so you only need to set it in one place.
You can set it anytime after the global netrefresh object has initalised.
Which is typically done in the Frame procedure.
So right-click there, go to source, and search for NetRefresh.

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NetRefresh & error 29
« Reply #4 on: February 26, 2009, 04:44:06 AM »
Perfect!
THanks
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NetRefresh & error 29
« Reply #5 on: March 18, 2009, 10:56:19 AM »
Bruce,
When I do not turn of autorefresh I use ( only at the frame init):

Instances" = 100
NetOptions(net:SetMaxInstances,Instances")

But I still got the error 29

How to avoid it?

Thanks
Albert
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetRefresh & error 29
« Reply #6 on: March 18, 2009, 10:45:48 PM »
Hi Alberto,

you're attacking this completely backwards.
You should be reducing the number of max Instances, not increasing it.

The error is coming from Windows, not the program. Remember some versions of windows have limits on how many ports can be open at a time, so you want to reduce the number of ports your program uses, not increase it.

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: NetRefresh & error 29
« Reply #7 on: March 19, 2009, 01:47:01 AM »
OK, but...

Whats the effect of the port quqntity?
What happen if I reduce it to 1 or if I set it to 10?

THanks
Alberto

-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NetRefresh & error 29
« Reply #8 on: March 19, 2009, 10:52:01 PM »
It affects the number of instances of your program that can run on the machine and still communicate with each other.

If only 1 instance is allowed at a time on the machine, then set it to 1. I think the default is 5.

Remember for terminal services each user is an instance, so if you have 20 terminal services users on the machine then it needs to be set to 20.

Cheers
Bruce