question

yexioamu avatar image
0 Likes"
yexioamu asked Natalie White commented

Can i get the client ip and port which connect to server socket in flexsim

Can i get the remote client ip and port which connect to server socket in flexsim

FlexSim 21.2.4
socket
· 7
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

Phil BoBo avatar image
0 Likes"
Phil BoBo answered

The FlexScript socket commands do not give you access to the connecting client's ip address. The serveraccept() function returns an index for the client connection that is subsequently used to receive messages from that client using serverreceive().

If you want more control over the communication than you get with the FlexScript commands, use external code, such as Python or C++. See Connecting to External Code.

See also accept function (C++) or socket.accept (Python).

5 |100000

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