The online racing simulator
Too small InSim :P
(9 posts, started )
Too small InSim :P
I wrote here:http://www.lfsforum.net/showthread.php?t=48585
a question How to connect over 8 apps. Now I haven't source but I musst connect 11 apps. One app for one packet( not all packets used of corse)
My friend tell me it's app what connect to server on 29999 and send packets to 30001 30002 and other ports and then you can connect more apps to insim. Have anyone source of this app - maybe I need to connect >20 apps (one for button - timers and DB data)


One app it's not good idea. I must can edit apps without disabling other
I dont quite understand what you're trying to do tbh. You can use a single thread for talking over InSim, a queue which other threads can put packets in to be sent and received via InSim, and separate threads for the logic. Depending on what you're doing you could even do it in a single thread, as long as you're careful...

InSim also works over TCP (there are only limitations if you use UDP) and can accept multiple connections over that, so it's simply a case of connecting in the same way multiple times. But more than a handful of apps is a bit nutty to be honest.
edit: irrelevant.
My apologies, 8 is indeed the limit - (from InSim.txt).
// InSim allows communication between up to 8 external programs and LFS.

But my friend tell that: For InSim is a divider(GOOGLE TRANSLATE) that you can connect >8 apps.
#6 - gru
Quote from misiek08 :For InSim is a divider(GOOGLE TRANSLATE)

gateway

i'm not sure if there is one for insim (and i'm to lazy to check )
but in another thread U wrote that 6 programs are made by U.
so why don't U pack it into one app (one insim connection)?
Yes, by using a "proxy" program, couldn't more than 8 connections be made? i.e., the proxy connects to LFS, and then each InSim app connects to the proxy, which manages all of the packets and ports. It would have difficulties, such as sending request replies to the correct program, but theoretically it's possible, isn't it? (proxy is probably the wrong word for this, sorry...)
Quote from gru :gateway

i'm not sure if there is one for insim (and i'm to lazy to check )
but in another thread U wrote that 6 programs are made by U.
so why don't U pack it into one app (one insim connection)?

It would be an interface engine custom writen for insim. There would need to have a database, something thin and simple to store the information while processing. I guess you could us a cached file for quickness. Or use a database server to store the information in a organized manner so you could retrieve it later if needed. I've been exposed a big interface engine for connecting healthcare systems together before. It is no easy task. To build it you would have to know insim backward and forward and have rule defined for each app sending. Recieving end of apps could be funny becuase you would have to know where the data was heading. This would go back to defining each app in the cluster (if you want to call it a cluster) so you know where to relay the data.

If you were going to go to all this trouble it would be better to write an app that does the job of all the apps you want to connect to.
Back when insim supported only 1 connection I wrote a gateway into my LFS Companion project. Mine wont work with the current insim, but you could recreate it easily enough.

It's simply a case of making an application that talks to LFS with a single ISI packet, and receives from the connected applications any ISI packets, analyses what data the child application wants and then discards the ISI packet and from then on forwards all traffic backward and forward.

Too small InSim :P
(9 posts, started )
FGED GREDG RDFGDR GSFDG