NetTalk Central

Author Topic: Problem NetAuto Server as a MDI Frame/Client  (Read 4679 times)

tglomb

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • AObit Software
    • Email
Problem NetAuto Server as a MDI Frame/Client
« on: May 10, 2017, 12:39:27 AM »
Hello,
my project is a Server (Self)service for different tasks. I use a MDI Application frame and several MDI Client Windows procedures as worker threads for the different tasks (so far only file- and DB based). Now I added a new task and so a new MDI client proc which shall be a NetServer according to Scenario 1. This proc instanciates (as the only one in the App) the NetServer object.
The problem now is, that the NetClient Apps (at 5 PC's in the LAN) "sometimes" cannot see the NetServer. This means GetServers() returns always -16. "Sometimes" means that i.e. 2 PC communicating immediately with the Server, 1 needs 10 minutes, the rest 1 hour. The comm. breaks regularely, for no reason they loose connection (-16 again). the normal network functions are working properly at these PC's and when GetServers() returns 0 then the Apps do correctly what they shall do. (BTW It works the same way as Service or as started by hand)

My first question: is it a problem to use NetAuto NetServer in a MDI Client procedure within a MDI Application frame ?

TIA, Thomas

ps the code and settings according to the Scenario 1 example and docs is double checked !

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Problem NetAuto Server as a MDI Frame/Client
« Reply #1 on: May 11, 2017, 01:39:44 AM »
>> My first question: is it a problem to use NetAuto NetServer in a MDI Client procedure within a MDI Application frame ?

it's not a problem as long as that procedure is the "top most window on the thread".
Opening other procedures from there, or calling MESSAGE or anything else that interferes with Events could break the communication to the object.

So it's almost always important for servers to be running as the "topmost window" in the thread.

cheers
Bruce

tglomb

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
    • AObit Software
    • Email
Re: Problem NetAuto Server as a MDI Frame/Client
« Reply #2 on: May 11, 2017, 09:26:12 AM »
thanx Bruce,
that's an important info.. should be in the docs.

But this was not my prob, I usually take care of such things. Today I was on site and what shall I say... these fucking admins promised me to all my questions "are you sure that all ports opened in the firewall ?" a "yes of course !". Of course not ! They simply did'nt opened the UDP ports. After opening immediately everything worked as expected.

But can it be that it work sometimes without the UDP ports opened ?

Sorry for trouble.
Ciao, Thomas

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Problem NetAuto Server as a MDI Frame/Client
« Reply #3 on: May 11, 2017, 10:15:21 PM »
>> But can it be that it work sometimes without the UDP ports opened ?

hmm, no I wouldn't have thought so.
If UDP is not available you need to use NetRemote command to connect to the other machines.

cheers
Bruce