StormHub / NetUV

.Net standard/Core binding for Libuv
Other
76 stars 22 forks source link

Question about ReadableBuffer.ReadString with separator #49

Closed oliverw closed 7 years ago

oliverw commented 7 years ago

Hi Jonny

I've recently replaced my own implementation of a managed wrapper around LibUv with NetUV and got a question about the ReadableBuffer.ReadString overload that accepts a separator. I'm using this to split incoming character data into lines:

https://github.com/coinfoundry/mining-core/blob/master/src/MiningCore/JsonRpc/JsonRpcConnection.cs#L46

What I'm not sure about (without digging deeper into NetUv) is what happens if ReadString is called when a newline has not yet been received (meaning client is somehow sending data in chunks).

StormHub commented 7 years ago

If the separator is not found, then entire content will be read out as string.

oliverw commented 7 years ago

Thanks. I need to change my implementation then.