Click here to Skip to main content
15,796,456 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to websockets and am developing an application to run on an IIS server with connection to a Windows Forms client. The message-oriented app (read as byte streams) will have a mix of message sizes, from less than 1k to a max of 64k. It will also have varying frequency of messages, with the potential for long idle periods between messages.

It appears that the "best" approach for framing is to specify a buffer size of 64k, but there doesn't seem to be a way to unallocate the buffer after handling the message. Is the same buffer used for multiple messages as long as the connection remains open? The Microsoft documentation seems a bit fuzzy here.

If there are a large number of connections, but a high percentage have long idle times between messages, is there a better way to scale?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900