Jump to content
The simFlight Network Forums

Multiple WideServer Sessions connected to one WideClient


Recommended Posts

Peter,

I have a question regarding WideFS. I need to know if I can connect a computer running WideClient to several computers running WideServer.

The reason to do this is to have a set of computers running FS2004 and changing a setting to all of them at the same time (ie. WXR conditions, position, etc.). Of course it only maes sense with this idea in mind, communication in the other direction makes no sense. This would be useful for training sessions in multiple computers at the same time, for example.

This implies having a program running on a computer communicating with FSUIPC sessions in several other computers via WideClient-WideServer communications.

Would this be possible? What settings would be needed (network)?

Thanks in advance for your help.

Luis

Link to comment
Share on other sites

I have a question regarding WideFS. I need to know if I can connect a computer running WideClient to several computers running WideServer.

...

The reason to do this is to have a set of computers running FS2004 and changing a setting to all of them at the same time (ie. WXR conditions, position, etc.). Of course it only maes sense with this idea in mind, communication in the other direction makes no sense. This would be useful for training sessions in multiple computers at the same time, for example.

The problem is that the interface to FSUIPC works by programs interfacing via FS's Window, using its classname "FS98MAIN" (don't ask why it is named that -- it has stuck since FS98). WideClient creates a Window with the same class name so that FSUIPC clients still interface correctly.

You cannot have multiple top level windows with the same classname and have unambiguous connections to them. Therefore, FS and WideClient refuse to run if that ClassName is already used.

There is a way, though, but you have to do some programming trickery. WideClient can be run multiple times on the same computer by use of different values for the "ClassInstance" parameter in its INI file. This even allows it to run alongside FS on the same PC. Please look this up in the WideFS technical document.

You'd then have to write your program to connect separately to each of the different Window classnames. This means not using the FSUIPC SDK's code as it stands, but modifying it to address the selected ClassInstance.

Regards

Pete

Link to comment
Share on other sites

Pete,

Thanks for your reply.

I don't know if I explained myself clearly. The situation would be the following:

1 computer running WideClient

10 computers running WideServer (FS running in each of those computers)

What I am trying to do is to send signals to FSUIPC on each computer from that single WideClient session.

So you are saying I would need to have several WideClient windows open in the PC where my program runs, each of them communicating with a specific WideServer session on each of the 10 computers?

Thanks,

Luis

Link to comment
Share on other sites

P

I don't know if I explained myself clearly.

Yes, it was very clear, thank you. Evidently you didn't understand my reply, though?

1 computer running WideClient

10 computers running WideServer (FS running in each of those computers)

Yes, understood. You can do it but with 10 copies of WideClient, not one, each connecting to a different server, and each client with a different value for "ClassInstance".

So you are saying I would need to have several WideClient windows open in the PC where my program runs, each of them communicating with a specific WideServer session on each of the 10 computers?

Yes, though they don't need visible Windows. Your program would have to open ten links, one each to the 10 different Class Names.

I'm afraid I cannot help further now till I return next Tuesday.

Regards

Pete

Link to comment
Share on other sites

  • 3 weeks later...

Thanks for your reply. It is clear that to establish unambiguous "two-way" connections between one WideClient and multiple WideServer connections, that would be the way to go.

I have one last question: Would an FSUIPC write command sent from the WideClient session be received at all the WideServer sessions and be followed? I know the WideClient session would be randomly receiving information from one or another WideServer instance, but would such a "broadcast" over the network be received by all WideServer instances? I know communication the other way around would be ambiguous.

Thanks again for your help,

Luis

Link to comment
Share on other sites

Thanks for your reply. It is clear that to establish unambiguous "two-way" connections between one WideClient and multiple WideServer connections, that would be the way to go.

Sorry, I'm a bit lost here. Which way is the "way to go"? You mean having 10 instances of WideClient and your program linking to all?

I have one last question: Would an FSUIPC write command sent from the WideClient session be received at all the WideServer sessions and be followed?

No, no. As I said, each Client to Server link is a one-to-one. You'd be writing 10 times, once to each client.

I know the WideClient session would be randomly receiving information from one or another WideServer instance

No it wouldn't. Each Client would only receive from its own Server. No confusion. Your program could tell the different data from each Server because of the client it was talking to.

I think you've misunderstood something since the last message in this thread, a few weeks ago?

Regards

Pete

Link to comment
Share on other sites

Hi again,

I did understand your reply, just trying to find a workaround to reprogramming the interface to FSUIPC.

The only other way I can think about communicating to different WideServer computers would be to try to do so sequentially, that is:

Starting situation:

3 FSX copmuters with WideServer running. Configured to connect to the same WideClient computer (IP address).

1 PC connected to the network to remotely access to each computer.

All computers connected to the same network.

Sequence:

1. Start WideClient in the remote computer, with the ServerIP address in the .ini file set to FSX computer #1.

2. Communicate with FSUIPC.

3. Close that WideClient session.

4. Start a new WideClient session with the ServerIP address in the .ini file set to FSX computer #2.

5. Communicate with FSUIPC.

6. Close that WideClient session.

7. And so on...

Would this work with the correct IP settings at each end?

Thanks,

Luis

Link to comment
Share on other sites

3 FSX copmuters with WideServer running. Configured to connect to the same WideClient computer (IP address).

Actually there's no such configuration to perform at the Server end. WideServer merely responds to any request from any Client.

1. Start WideClient in the remote computer, with the ServerIP address in the .ini file set to FSX computer #1.

2. Communicate with FSUIPC.

3. Close that WideClient session.

4. Start a new WideClient session with the ServerIP address in the .ini file set to FSX computer #2.

5. Communicate with FSUIPC.

6. Close that WideClient session.

7. And so on...

That seems very strange. Are you saying you only need one transaction with each copy of FS? And/or you never need to talk to them all at the same time?

Would this work with the correct IP settings at each end?

There are no IP settings at the Server end in any case. What you are suggesting is no different from the practice now on any WideFS setup. I now realise that I have no real idea of what you want to do, so I can't really comment on such a proposal.

If you've no need for simultaneous access to multiple Servers then there never has been any problem.

If you want maintained simultaneous access, then you can simply run multiple copies of WideClient, at the same time, by using the ClassInstance parameter to set up each one with a different Window Classname. In your application you then adapt the code for the FSUIPC interface (the source of which is provided in the SDK) to send the same data to each resulting Window Class. This is what I suggested as your easiest solution a while back, but now it seems you don't actually want simultaneous or maintained access? So there never was any real problem?

Regards

Pete

Link to comment
Share on other sites

Yes Peter, my original question was about multiple simultaneous connections, and I understood your reply.

Since I am trying to avoid the nuissance of reprogramming the inerface to FSUIPC, and SEQUENTIAL connections COULD be the answer, I was trying to get your thoughts on this approach.

I understand that by changing the ServerIP in the WideClient session, I would be able to interface to the FSX session of choice in each case.

Thanks for your help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.