<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Why the serveraccept function in socket limit 50? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/why-the-serveraccept-function-in-socket-limit-50/m-p/13598299#M92566</link>
    <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.2.4 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello, when i create a server socket in flexsim, and send message by external system(WMS), becasue the external system has a lot of task, so it use thread to send message to flexsim server, it means flexsim server need to accept different connection from different port, i create new connetion in loop by code like this：&lt;/P&gt;
 &lt;PRE&gt;int client = serveraccept(1);
while(client == 0){
      clientclose(client);
      int client = serveraccept(1);
}&lt;/PRE&gt;
 &lt;P&gt;it work fine at first, but when the client value reach 50, it not work, does the return value of serveraccept is 50, it limit 50 connection?&lt;/P&gt;
 &lt;P&gt;Then, i solved it by ending the server and create a new server when the connections reach 50.&lt;/P&gt;
 &lt;P&gt;Could someone tell me the reason? Thanks!&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 20 Jul 2023 02:50:04 GMT</pubDate>
    <dc:creator>yexioamu</dc:creator>
    <dc:date>2023-07-20T02:50:04Z</dc:date>
    <item>
      <title>Why the serveraccept function in socket limit 50?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/why-the-serveraccept-function-in-socket-limit-50/m-p/13598299#M92566</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 21.2.4 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Hello, when i create a server socket in flexsim, and send message by external system(WMS), becasue the external system has a lot of task, so it use thread to send message to flexsim server, it means flexsim server need to accept different connection from different port, i create new connetion in loop by code like this：&lt;/P&gt;
 &lt;PRE&gt;int client = serveraccept(1);
while(client == 0){
      clientclose(client);
      int client = serveraccept(1);
}&lt;/PRE&gt;
 &lt;P&gt;it work fine at first, but when the client value reach 50, it not work, does the return value of serveraccept is 50, it limit 50 connection?&lt;/P&gt;
 &lt;P&gt;Then, i solved it by ending the server and create a new server when the connections reach 50.&lt;/P&gt;
 &lt;P&gt;Could someone tell me the reason? Thanks!&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Jul 2023 02:50:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/why-the-serveraccept-function-in-socket-limit-50/m-p/13598299#M92566</guid>
      <dc:creator>yexioamu</dc:creator>
      <dc:date>2023-07-20T02:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why the serveraccept function in socket limit 50?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/why-the-serveraccept-function-in-socket-limit-50/m-p/13598300#M92567</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;Yes there is a limit of 50 connections. The problem is you aren't closing the socket correctly.&lt;/P&gt;&lt;P&gt;Instead of calling clientclose() you should be calling &lt;A rel="noopener noreferrer" href="https://docs.flexsim.com/en/23.2/Reference/CodingInFlexSim/CommandReference/Commands.html#servercloseconnection" target="_blank"&gt;servercloseconnection()&lt;/A&gt;.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Jul 2023 17:48:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/why-the-serveraccept-function-in-socket-limit-50/m-p/13598300#M92567</guid>
      <dc:creator>Jacob_Gillespie</dc:creator>
      <dc:date>2023-07-24T17:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why the serveraccept function in socket limit 50?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/why-the-serveraccept-function-in-socket-limit-50/m-p/13598301#M92568</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;Thank you, it works fine! when i calling servercloseconnection(), the connection can be close correctly.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Jul 2023 03:03:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/why-the-serveraccept-function-in-socket-limit-50/m-p/13598301#M92568</guid>
      <dc:creator>yexioamu</dc:creator>
      <dc:date>2023-07-27T03:03:27Z</dc:date>
    </item>
  </channel>
</rss>

