jgauffin / griffin.networking

Networking library for .NET
http://blog.gauffin.org/2012/05/griffin-networking-a-somewhat-performant-networking-library-for-net/
GNU Lesser General Public License v3.0
108 stars 35 forks source link

IMessageBuilder reused without initialization. #5

Closed yjchun closed 11 years ago

yjchun commented 11 years ago

MessageClientContext is preallocated by server and reused when client connects. IMessageBuilder is reused by MessageClientContext eventually.

If IMessageBuilder has any state machine in it (like in my server...) It fails to work once it is reused. I can find no easy workaround for this problem.

I would expect IMessageFormatterFactory.CreateBuilder() is called every time client is connected.

jgauffin commented 11 years ago

Good point. I'll implement it