Jump to content

Mehmet Emin

uniGUI Subscriber
  • Posts

    229
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by Mehmet Emin

  1. Since you are using CreateAnonymousThread and calling TUniServerModule.myproc, TUniServerModule has already same named property "Terminated". So I think you would better have your thread class and check the threads "Terminated" property within. Then you be able to exit the while loop. Also after FmyThread.Terminate; you can call thread waitfor better cleanup.

  2. @M.Ammar

    This is from Hyperserver documentation. Did you consider these notes?

    If you plan to run more than one instance of HyperServer on same OS then port numbers should be arranged in a way that they won't conflict with each other. You must ensure that all Nodes will be assigned unique port numbers. This can be easily done by leaving port gaps for each HyperServer instance. It can be calculated using below formula:

    <start_port for new HyperServer instance> = <start_port of previous HyperServer instance> + ( <max_nodes of previous HyperServer instance> × 3 ) + 8 

    Consider that you plan to install three HyperServer instances on same server. Instances are configured with max_nodes parameters of 8, 16 and 16 respectively.

    For 1st instance start_port is configured as 16384 ( or any other desired value )

    For 2nd instance start_port should be configured as 16384 + ( 8×3 + 8 ) = 16416

    For 3rd instance start_port should be configured as 16416 + ( 16×3 + 8 ) = 16472

    • Like 1
  3. Mehmet Bey

    Bu kod işinizi görür mü acaba başka bir thread'e cevap olarak yazmıştım test etmedim yanlız.

      if UniServerModule <> nil then
      begin
        if UniServerModule.SessionManager <> nil then
        begin
          if UniServerModule.SessionManager.Sessions.QuerySession(thesessionidfromdb) then
          begin
            LSession := UniServerModule.GetSession(thesessionidfromdb);
            UsersMainModule := TUniMainModule(LSession.UniApplication.UniMainModule);
            
            UsersMainModule.YourGameStateUpdated := True;
            
          end;
        end;

  4. Hi @Abaksoft

    I used IIS 10. Install urlrewrite2.exe module for IIS from this url: https://www.iis.net/downloads/microsoft/url-rewrite

    Using url rewrite module goto manage server varibles and add two variables: HTTP_X_ORIGINAL_ACCEPT_ENCODING and HTTP_ACCEPT_ENCODING

    The following web.config file will do the rest. Please configure this config as per your case.

    ** I am using mobiletoolkit so there is "/m" in uniGUI urls.

    web.config:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="RewriteUserFriendlyURL1" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
                        <match url="*" />
                        <conditions>
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                        </conditions>
                        <action type="Rewrite" url="myapp/myisapi.dll/{R:1}" />
                        <serverVariables>
                            <set name="HTTP_X_ORIGINAL_ACCEPT_ENCODING" value="{HTTP_ACCEPT_ENCODING}" />
                            <set name="HTTP_ACCEPT_ENCODING" value="" />
                        </serverVariables>
                    </rule>
                </rules>
                <outboundRules rewriteBeforeCache="true">
                
                    <rule name="RestoreAcceptEncoding" preCondition="NeedsRestoringAcceptEncoding">
                        <match serverVariable="HTTP_ACCEPT_ENCODING" pattern="^(.*)" />
                            <action type="Rewrite" value="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" />
                    </rule>
                    <preConditions>
                        <preCondition name="NeedsRestoringAcceptEncoding">
                        <add input="{HTTP_X_ORIGINAL_ACCEPT_ENCODING}" pattern=".+" />
                        </preCondition>
                    </preConditions>            
                            
                    <rule name="ext-7.0.0" preCondition="NeedsRestoringAcceptEncoding" enabled="true" patternSyntax="Wildcard" stopProcessing="false">
                        <match filterByTags="A, Link, Script" pattern="/myapp/myisapi.dll/m/ext-7.0.0/*" />
                        <action type="Rewrite" value="https://mycdn.example.com/ext-7.0.0/{R:1}" />
                    </rule>
                    
                    <rule name="uni-1.90.0.1549" preCondition="NeedsRestoringAcceptEncoding" enabled="true" patternSyntax="Wildcard" stopProcessing="false">
                        <match filterByTags="A, Link, Script" pattern="/myapp/myisapi.dll/m/uni-1.90.0.1549/*" />
                        <action type="Rewrite" value="https://mycdn.example.com/uni-1.90.0.1549/{R:1}" />
                    </rule>

                    <rule name="unim-1.90.0.1549" preCondition="NeedsRestoringAcceptEncoding" enabled="true" patternSyntax="Wildcard" stopProcessing="false">
                        <match filterByTags="A, Link, Script" pattern="/myapp/myisapi.dll/m/unim-1.90.0.1549/*" />
                        <action type="Rewrite" value="https://mycdn.example.com/unim-1.90.0.1549/{R:1}" />
                    </rule>

                    <rule name="unipackages-7.0.0" preCondition="NeedsRestoringAcceptEncoding" enabled="true" patternSyntax="Wildcard" stopProcessing="false">
                        <match filterByTags="A, Link, Script" pattern="/myapp/myisapi.dll/m/unipackages-7.0.0/*" />
                        <action type="Rewrite" value="https://mycdn.example.com/unipackages-7.0.0/{R:1}" />
                    </rule>
                    
                </outboundRules>
            </rewrite>
            <urlCompression doStaticCompression="true" />
        </system.webServer>
    </configuration>
     

     

     

     

    • Like 2
    • Upvote 1
×
×
  • Create New...