question

Ryusuke T avatar image
0 Likes"
Ryusuke T asked Jeanette F commented

Socket creation fails

Hi,

The customer uses Flexsim's Socket communication to create a model that works with an external simulator.

A Socket is created at the start of the simulation, but it seems to occasionally fail (the execution result of Socket creation is 0).


We are conducting a simulation under the following conditions, but could you please let us know if there are any points that we should be careful about when performing external communication like this?


conditions

・External simulators can be run on the PC running FlexSim, within a VM launched on that PC, or on an external PC (connected via wire)

・Although the PC operation is slow, there are no communication delays.

・The number of sockets created at one time is about 10.

・Restarting FlexSim after the failure fixes it.

・The frequency is about once every few dozen simulations.


The document states that there can be up to 50 sockets at the same time, but since the number of sockets at one time is small and SocketClose is performed when resetting the simulation, I don't think the limit has been reached.


Thank you for advance.

FlexSim 23.0.11
socket
· 5
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Kavika F avatar image Kavika F ♦ commented ·
Hey @Ryusuke T, are you calling the " clientclose()" command on reset? If so, are you checking to make sure the sockets close correctly with the return value? If the sockets are not closing correctly, that may lead to them accumulating over the runs to then reach the limit.
0 Likes 0 ·
Ryusuke T avatar image Ryusuke T Kavika F ♦ commented ·

@Kavika F ,

Yes, running clientclose() on reset and SocketInit afterwards.

Therefore, after resetting and re-simulating, the Socket number did not increase.

Are there any similar cases or reproducibility?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Ryusuke T commented ·
Right but Kavika is asking you to confirm that clientclose() returns 1 every time you call it.
0 Likes 0 ·
Show more comments
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Ryusuke T,

We haven't heard back from you. Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond to the previous comment so that we can continue to help you.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question.

0 Likes 0 ·

0 Answers