|
From: www2 <ww...@wo...> - 2023-06-21 18:24:51
|
He petric The code that you posted is websockets not the normal sockets. if you run fgfs --httpd=5500 than work the code as normal Jean-Paul Anceaux (www2) Op 21-06-2023 om 19:52 schreef Patrick Callahan: > Jean-Paul, > > I'm hoping that you and I can work together on this, and that my > contribution will be helpful. > > I'm trying to find a good way to get multiple properties into and out > of flightgear from a client. The client will connect hardware cockpit > instruments and radios. > > I have your client code, https://pastebin.com/MqbNXcsF > <https://pastebin.com/MqbNXcsF> running in Linux alongside flightgear. > However I'm getting errors. I get the same errors using --http 5500 > > So I've got some work to do to see why, unless you can point me in the > right direction. > > -Pat Callahan > Framingham, Ma, Usa > If any of you want to work one-on-one with me on any aspect of flightgear, > I'm available for live chat on Discord, Zoom, irc and other platforms > and of course through the list. > > With Flightgear, built from next on Jun 5 15:58 EDWT > > /work/trees/next/run_fgfs.sh --multiplay=in,192.168.1.246,5000 > --callsign=N1742C --timeofday=noon > --generic=socket,bi,5,127.0.0.1,5500,tcp,apc-protocol --enable-terrasync > --enable-real-weather-fetch --enable-horizon-effect --developer next > > (.venv) pac1@Spinnaker:/work/fg$ /work/trees/jp_master/.venv/bin/python > /work/trees/jp_master/jp/MqbNXcsF.py > qt.network.ssl: QSslSocket: cannot resolve EVP_PKEY_base_id > qt.network.ssl: QSslSocket: cannot resolve SSL_get_peer_certificate > error code: 0 > Invalid URL. > client: send_message > timer timeout - exiting > > On Tue, Jun 13, 2023 at 5:11 AM James Turner <ja...@fl... > <mailto:ja...@fl...>> wrote: > > > >> On 12 Jun 2023, at 10:32, www2 <ww...@wo... >> <mailto:ww...@wo...>> wrote: >> >> what current understand is that with the generic protocol is that the >> command: >> fgfs --generic=socket,in,5,127.0.0.3,1234,tcp,abc-protocol >> act as a server that reseve data and the command >> fgfs --generic=socket,out,5,127.0.0.3,1234,tcp,abc-protocol >> act as a client that send only send. >> (disclaimer i need to test this for id this is correct or this is >> revert >> what i say) > > Correct, but for 12+ years you can also pass > > —generic=socket,bi,5,127.0.0.1,1234,tcp,abc-protocol > > and it will both read and write. > > Caveat: in ‘bi’ mode, the socket works in server mode, same as ‘in’ > mode; you need to connect to it from your other side. But once you > connect it will send you output data as normal. Ideally we would > have some way to say ‘bi, but a client’ vs ‘bi, but a server’ but > currently not possible. > > As ever, you should confirm this by reading the source code (eg, > sg_socket.cxx and Network/generic.cxx) which are well commented. > (Which is what I just did) Then you can document it for the next > person :) > > Kind regards, > James > > _______________________________________________ > Flightgear-devel mailing list > Fli...@li... > <mailto:Fli...@li...> > https://lists.sourceforge.net/lists/listinfo/flightgear-devel > <https://lists.sourceforge.net/lists/listinfo/flightgear-devel> > > > > _______________________________________________ > Flightgear-devel mailing list > Fli...@li... > https://lists.sourceforge.net/lists/listinfo/flightgear-devel |