-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IGNITE-15356 .NET: Add basic thin client #306
Conversation
…server, fix message length on client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good.
prefixWriter.Write(7); | ||
prefixWriter.Write(8); | ||
prefixWriter.Write(9); | ||
writer.Flush(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why writer
and not prefixWriter
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, fixed. Flush is not always necessary, we got lucky here, but it should always be called.
private int _index; | ||
|
||
/** Index within the array. */ | ||
private int _index2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably needs a better name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, fixed.
byte d = jBytes[15]; | ||
byte e = jBytes[14]; | ||
byte f = jBytes[13]; | ||
byte g = jBytes[12]; | ||
byte h = jBytes[11]; | ||
byte i = jBytes[10]; | ||
byte j = jBytes[9]; | ||
byte k = jBytes[8]; | ||
|
||
int a = BinaryPrimitives.ReadInt32BigEndian(jBytes[4..]); | ||
short b = BinaryPrimitives.ReadInt16BigEndian(jBytes[2..]); | ||
short c = BinaryPrimitives.ReadInt16BigEndian(jBytes); | ||
|
||
return new Guid(a, b, c, d, e, f, g, h, i, j, k); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why GUID serialization format is that weird?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guid
and UUID
use different encoding, see https://en.wikipedia.org/wiki/Universally_unique_identifier#Encoding.
XMLDoc comments updated.
MessagePack-CSharp
andArrayPool.Shared
https://cwiki.apache.org/confluence/display/IGNITE/IEP-78+.NET+Thin+Client