question

Sean avatar image
0 Likes"
Sean asked Natalie White answered

Socket Question

Hi,

I'm trying connect 3 clients to socket. These are my steps. You can see it connect successfully in step 2.Then I send message in step3 but server only receive message from socket 1, socket 2 and socket 3 doesn't receive. It's any wrong with my script? Thank's.socket-1.pngsocket-2.png

FlexSim 23.1.2
socketclientsentserverreceive
socket-1.png (57.3 KiB)
socket-2.png (75.4 KiB)
5 |100000

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

1 Answer

Natalie White avatar image
1 Like"
Natalie White answered

Hi @Sean!

In your first script, you just need to add two more lines of code that say "serveraccept(0)". This is because serveraccept() can only accept a single client connection, so you need to run the command three times.

If the socket indices have not been reset, you may need to check your server side connection numbers and your client side connection numbers to make sure they are correct in order for this to work.

5 |100000

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