2

我想听听您对我在 c# 中遇到的设计问题的建议。

所以,我正在制作一个程序,人们可以通过互联网或局域网在同一个窗口中见面和画画。我正在绘制位图,然后将其设置为图片框组件。

我很难决定如何向每个用户发送更新,最好的方法是什么。

我应该发送鼠标坐标而不是在每个用户屏幕上进行绘图还是将图像流式传输到每个用户。也许您知道更好的解决方案来保持同步和高效。

谢谢你。

4

1 回答 1

5

I've worked on this sort of app before, and it's much more bandwidth-efficient to send a data structure indicating mouse movement, clicks, drawing primitives, etc. across the line, then do the rendering separately on both sides. Properly implemented, this allows for almost real-time mirroring, which you'll have a hard time getting if you're sending bitmaps back and forth.

于 2010-04-07T23:49:38.873 回答