Problem with Socket and Serialization C#

前端 未结 6 1143
陌清茗
陌清茗 2021-01-27 13:23

I implemented a Client and Server model that uses Socket with thread

When I want to pass only a string from Client to the Server, it works. But I want to pass an object

6条回答
  •  情深已故
    2021-01-27 13:48

    You never use the message that you read from the stream. The memory stream you are reading from is thus empty.

    On a side note, why do you use these intermediate MemoryStreams?

提交回复
热议问题