[PROGRAM] OpenYS - Open Source YSFlight Server!

Note that alterations to the YSFlight .EXE is forbidden
User avatar
NajmiCreative
Modding Team
Modding Team
Posts: 768
Joined: Thu Sep 04, 2014 9:14 am
Favorite Aircraft: MiG-29N,SU-30 MKM
Location: Shah Alam,Selangor,Malaysia
OS: Windows 10 Home
Has thanked: 479 times
Been thanked: 472 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by NajmiCreative » Fri Mar 04, 2016 7:30 am

almost forget,when I going to OpenYS based online servers like CivAv,I didn't get the time transition clearly which the night time change to day without changing color to indicate sunrise or sunset.
any idea how to make the sky changes color before it changes day to night or vice versa?
My official website
My Twitter NOTE:All my rework model are allowed for repaint and need to credit on publish..no need to PM me anymore
for modifications on my mods,please PM me first,and credit me and original creator(if my work were rework)
[/size]

User avatar
NightRaven
Staff
Staff
Posts: 1839
Joined: Tue Feb 07, 2012 10:00 am
Favorite Aircraft: soviet and (nazi) german aircraft
Location: singapore
OS: windoze 10 64-bit
Has thanked: 524 times
Been thanked: 605 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by NightRaven » Fri Mar 04, 2016 8:28 am

Update your YS version. Sky color changes are supported in YS versions after the 2012 stable, or only on the 2015 version (iirc).
Image

User avatar
Flake
Staff
Staff
Posts: 4244
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 803 times
Been thanked: 1157 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Fri Mar 04, 2016 9:44 am

Alright I tried. I'll have to work something out.

User avatar
NajmiCreative
Modding Team
Modding Team
Posts: 768
Joined: Thu Sep 04, 2014 9:14 am
Favorite Aircraft: MiG-29N,SU-30 MKM
Location: Shah Alam,Selangor,Malaysia
OS: Windows 10 Home
Has thanked: 479 times
Been thanked: 472 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by NajmiCreative » Fri Mar 04, 2016 10:59 am

NightRaven wrote:Update your YS version. Sky color changes are supported in YS versions after the 2012 stable, or only on the 2015 version (iirc).
Actually,I use 2013 version :D
And I still keep the installer in mediafire
My official website
My Twitter NOTE:All my rework model are allowed for repaint and need to credit on publish..no need to PM me anymore
for modifications on my mods,please PM me first,and credit me and original creator(if my work were rework)
[/size]

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3728
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1519 times
Been thanked: 1645 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Fri Mar 04, 2016 3:34 pm

It has to be the 2015 version for color changes.

User avatar
Flake
Staff
Staff
Posts: 4244
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 803 times
Been thanked: 1157 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Sat Mar 05, 2016 4:59 am

For me for later:

http://stackoverflow.com/questions/6023 ... in-c-sharp

Code: Select all

class ClientContext
{
    public TcpClient Client;
    public Stream Stream;
    public byte[] Buffer = new byte[4];
    public MemoryStream Message = new MemoryStream();
}

class Program
{
    static void OnMessageReceived(ClientContext context)
    {
        // process the message here
    }

    static void OnClientRead(IAsyncResult ar)
    {
        ClientContext context = ar.AsyncState as ClientContext;
        if (context == null)
            return;

        try
        {
            int read = context.Stream.EndRead(ar);
            context.Message.Write(context.Buffer, 0, read);

            int length = BitConverter.ToInt32(context.Buffer, 0);
            byte[] buffer = new byte[1024];
            while (length > 0)
            {
                read = context.Stream.Read(buffer, 0, Math.Min(buffer.Length, length));
                context.Message.Write(buffer, 0, read);
                length -= read;
            }

            OnMessageReceived(context);
        }
        catch (System.Exception)
        {
            context.Client.Close();
            context.Stream.Dispose();
            context.Message.Dispose();
            context = null;
        }
        finally
        {
            if (context != null)
                context.Stream.BeginRead(context.Buffer, 0, context.Buffer.Length, OnClientRead, context);
        }
    }

    static void OnClientAccepted(IAsyncResult ar)
    {
        TcpListener listener = ar.AsyncState as TcpListener;
        if (listener == null)
            return;

        try
        {
            ClientContext context = new ClientContext();
            context.Client = listener.EndAcceptTcpClient(ar);
            context.Stream = context.Client.GetStream();
            context.Stream.BeginRead(context.Buffer, 0, context.Buffer.Length, OnClientRead, context);
        }
        finally
        {
            listener.BeginAcceptTcpClient(OnClientAccepted, listener);
        }
    }

    static void Main(string[] args)
    {
        TcpListener listener = new TcpListener(new IPEndPoint(IPAddress.Any, 20000));
        listener.Start();

        listener.BeginAcceptTcpClient(OnClientAccepted, listener);

        Console.Write("Press enter to exit...");
        Console.ReadLine();
        listener.Stop();
    }
}
See also https://github.com/samfromdeath/CSharpServer

User avatar
Dragon_Mech
Veteran
Veteran
Posts: 571
Joined: Wed Jul 15, 2015 12:18 pm
Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
Location: Mansfield, Mo. USA
OS: Windows 7 Ultimate
Has thanked: 93 times
Been thanked: 127 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Dragon_Mech » Mon Mar 07, 2016 1:25 am

I got this error while trying to use the OpenYS tray app without being connected to the internet
i have Windows 7 Ultimate 64-bit with SP1.

Code: Select all

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at OpenYS.OpenYS_Client_App.Authenticate()
   at OpenYS.OpenYS_Client_App.OnLoad(EventArgs e)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
OpenYS-ClientMode
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34251 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
OpenYS Settings Handler
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Development Utilities
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Console IO
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Task Sequencer
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Task Scheduler
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Server (Client Receiver)
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
OpenYS Output Logger
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Commands
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Core (Required Variables and Functions)
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Client Object
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Packet Types
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Vehicle
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
OpenYS YSFlight MetaData Loader
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
EPPlus
    Assembly Version: 4.0.4.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
OpenYS-Link
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/YSFLIGHT.COM/YSFLIGHT/OpenYS_20160302/OpenYS-ClientMode.exe
----------------------------------------
i'm not sure, but his maybe the same error that i got before i added the new inbound/outbound rules to my firewall.
Owner, Dragonic Machine Industries
Image

User avatar
Flake
Staff
Staff
Posts: 4244
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 803 times
Been thanked: 1157 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Mon Mar 07, 2016 2:28 am

Okay, yes the client will need firewall access! It's making an outbound connection request!

User avatar
Flake
Staff
Staff
Posts: 4244
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 803 times
Been thanked: 1157 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Mon Mar 07, 2016 2:53 am

Congrats to Dragon Mech who is currently leading the total flight time with ~3.7 total flight hours online! :D

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3728
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1519 times
Been thanked: 1645 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Mon Mar 07, 2016 3:06 am

Still feeling left out. :cry:

User avatar
Flake
Staff
Staff
Posts: 4244
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 803 times
Been thanked: 1157 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Mon Mar 07, 2016 6:24 am

To be fair to you, log your hours manually for me and I'll update your time in the database manually myself later on. I'll get this sorted soon! :)

User avatar
Dragon_Mech
Veteran
Veteran
Posts: 571
Joined: Wed Jul 15, 2015 12:18 pm
Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
Location: Mansfield, Mo. USA
OS: Windows 7 Ultimate
Has thanked: 93 times
Been thanked: 127 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Dragon_Mech » Thu Mar 10, 2016 7:06 am

Flake, i think that the tray app is recording the wrong amount of flight time. because there is no way that i have racked up 14+ hours of flight time while using the app.
Owner, Dragonic Machine Industries
Image

User avatar
Flake
Staff
Staff
Posts: 4244
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 803 times
Been thanked: 1157 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Thu Mar 10, 2016 7:37 am

:lol: Oh dear. This is a train wreck hahaha. :lol: :oops:

Bugger it, this is a test round only. See if it works for you only. All stats will be reset when it is stable.

User avatar
Dragon_Mech
Veteran
Veteran
Posts: 571
Joined: Wed Jul 15, 2015 12:18 pm
Favorite Aircraft: F-14, F-15D&E, SR-71, King Air 200, B737
Location: Mansfield, Mo. USA
OS: Windows 7 Ultimate
Has thanked: 93 times
Been thanked: 127 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Dragon_Mech » Thu Mar 10, 2016 7:51 am

oh it works... as long as i don't try to use it offline :lol:
Owner, Dragonic Machine Industries
Image

User avatar
Flake
Staff
Staff
Posts: 4244
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 803 times
Been thanked: 1157 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Thu Mar 10, 2016 10:01 am

Oh lol, fail. :lol:

User avatar
Barr
Veteran
Veteran
Posts: 1003
Joined: Wed Mar 28, 2012 8:49 pm
Favorite Aircraft: The Boeing 757
Location: Providence, Rhode Island
OS: Windows 10/Gentoo
Has thanked: 268 times
Been thanked: 199 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Barr » Sat Mar 12, 2016 4:36 am

Oh ok I noticed something. So When I add the ysfhq.username line to the settings and try to to start up the program I cant authenticate becuase theres no password.

When I add the "password" line the tray app crashes AND deletes the setting .alsx


Ignore top comment again. It works, but it wont connect to the civav. It will say loading but then itll show a list of all servers on the serverlist? I can log on to the Cp funhouse server but it will crash about 5 seconds in. No issues when not using the system trya
Image
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3728
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win Vista
Has thanked: 1519 times
Been thanked: 1645 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Neocon » Sat Mar 12, 2016 4:56 am

I tried it out and got this when I entered my name and password and selected "Authenticate":

Code: Select all

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.IOException: The handle is invalid.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
   at System.Console.get_WindowWidth()
   at OpenYS.SettingsHandler.SaveAll()
   at OpenYS.OpenYS_Client_App.Authenticate()
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
OpenYS-ClientMode
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34251 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34285 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
OpenYS Settings Handler
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Development Utilities
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Console IO
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Task Sequencer
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Task Scheduler
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Server (Client Receiver)
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34283 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
OpenYS Output Logger
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Commands
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Core (Required Variables and Functions)
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Client Object
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Packet Types
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
OpenYS Vehicle
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.34209 built by: FX452RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
OpenYS YSFlight MetaData Loader
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
EPPlus
    Assembly Version: 4.0.4.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
OpenYS PacketHandler
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------
OpenYS-Link
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/YSFLIGHT.COM/YSFLIGHT%20-%202015%20YSCAS/OpenYS_20160302(1613)/Release/OpenYS-ClientMode.exe
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

User avatar
Flake
Staff
Staff
Posts: 4244
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 803 times
Been thanked: 1157 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Sat Mar 12, 2016 7:05 am

Aye. Guys this build is a tragic failure, I'll probably re-imagine how I'm going to do this. Potentially server sided instead. That means I'll have to code a "login" interface, much like the /password command. In fact I might just rename the "/password" command to something else to keep compatability, but the general idea would be in future you can set admin priviliges to specific YSFHQ accounts.

The end user logs in with YSF client only, types the login command and authenticates that way - no more tray app.

---

I've been working on Async Sockets today using Streams & BinaryReaders. This method is meant for use on high end c# server applications but It's something I've really struggled to understand. I got 10% of the way done today before rushing off to work. I was able to receive the first packet today though. Send packets is a whole other ball park. I'm just sort of experimenting at this stage and thus this is a little spin off project I'm working on. In fact when I get home tomorrow from work, I'll create a new OYS-Executable that would only exist in development mode - it'll be my testing ground, so there will be no more sloppy code all over the place as I develop and redevelop. I can look at the fCraft source again to map out how the sockets send and receive data and make my own implementation. It might mean abandoning user threads entirely and going with async callbacks though - performance increase due to much less threads, but stability decrease due to the changed nature of how the program operates.

---

It's a big change though guys. My current method works though it is laggy. One day I will find a solution that works permanently. Hopefully this is it. Async sends would also mean I can do away with ConcurrentQueue and DefferedSending. The current method checks for incoming data, and receives and actions it, before then sending all the queued data. The problem here is they are waiting on each other. But I had to "defer" packets to keep the lag limited to the one connection. When Sockets class sends data, it blocks thread execution until the data is confirmed successfully sent. The problem with OYS right now is I do not confirm receipt of a packet (no way of checking...) and I that sending data to multiple clients bottlenecks the server, hence I made it each clients responsibility. As I mentioned above the current system has the server do receipts first, then sends... repeat. The new system (hopefully) would allow for simultaneous sends and receipts for any one client (reducing lag a lot) and also it will kill the need for my deffered sending workaround since a data send is asynchronous, so the sending thread doesn't get lagged down waiting for "sent" confirmations. Async really is the way forwards but I've just got to implement it properly. If I do so, OYS executable sizes will shrink a lot and lag would theoretically be on par if not better than stock YS (Async Sockets works exactly how TCP/IP Windows Sockets are structured, so it's code wise identical to how c++ would do it(?))

User avatar
NightRaven
Staff
Staff
Posts: 1839
Joined: Tue Feb 07, 2012 10:00 am
Favorite Aircraft: soviet and (nazi) german aircraft
Location: singapore
OS: windoze 10 64-bit
Has thanked: 524 times
Been thanked: 605 times

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by NightRaven » Thu Mar 17, 2016 3:33 am

Apparently for flight logging times, the Client logs the time in a very weird manner. For the first flight it logs the time correctly, but for the subsequent times, the previous flight times are added to that flight's time.

Let's put it in numbers.
Let A be flight time for each flight and B be total flight time logged.
Say the first flight is 1 hour. The program records it correctly (A=1h and B=1h, assuming B=0 at start). However, in the second flight, say 0.5h, the program records A as 1.5h instead of 0.5h, hence making B=2.5h instead of 1.5h. This carries on for subsequent flights, making the total time logged hugely inflated.
Image

User avatar
Flake
Staff
Staff
Posts: 4244
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 803 times
Been thanked: 1157 times
Contact:

Re: [PROGRAM] OpenYS - Open Source YSFlight Server!

Post by Flake » Thu Mar 17, 2016 5:23 am

Good to know - cheers! :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest