Using buffer in socket connection

Using buffer in socket connection

hoang_nk
Not applicable
533 Views
2 Replies
Message 1 of 3

Using buffer in socket connection

hoang_nk
Not applicable

[ FlexSim 22.1.2 ]

Hi all,

I'm making a socket connection and decided to make my model as the server.

I would like to ask on how to create a buffer for the message receiving. I'm using the command "serverreceive" and found out from a documentation that the buffer and buffersize options are not in use in FlexSim. Could someone suggest any ideas to overcome this?

Many thanks in advance,

Hoang Nguyen

0 Likes
Accepted solutions (1)
534 Views
2 Replies
Replies (2)
Message 2 of 3

philboboADSK
Autodesk
Autodesk
Accepted solution

From serverreceive()'s documentation: "In flexscript, however, buffer should be passed as NULL, and the return value will be the actual string that is received."

string readstr = serverreceive(1, NULL, 15, 0);

1660055332269.png



Phil BoBo
Sr. Manager, Software Development
0 Likes
Message 3 of 3

andrew_o2
Not applicable

Hi @Hoang Nk, was Phil BoBo's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes