Socket Question

Socket Question

hsiangchao
Not applicable
61 Views
1 Reply
Message 1 of 2

Socket Question

hsiangchao
Not applicable

[ FlexSim 23.1.2 ]

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

0 Likes
Accepted solutions (1)
62 Views
1 Reply
Reply (1)
Message 2 of 2

natalie_white
Not applicable
Accepted solution

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.