Exemplo n.º 1
0
        private static byte[] CreateSuccessMessage()
        {
            var stream = new MemoryStream();
            var writer = new PackStreamWriter(stream, null);

            writer.WriteStructHeader(1, BoltProtocolV3MessageFormat.MsgSuccess);
            writer.WriteMapHeader(1);
            writer.Write("x");
            writer.Write(1);

            return(CreateChunkedMessage(stream.ToArray()));
        }
Exemplo n.º 2
0
        private static byte[] CreateNodeMessage()
        {
            var stream = new MemoryStream();
            var writer = new PackStreamWriter(stream, null);

            writer.WriteStructHeader(3, NodeSerializer.Node);
            writer.Write(1L);
            writer.Write(new List <string> {
                "Label"
            });
            writer.Write(new Dictionary <string, object>());

            return(CreateChunkedMessage(stream.ToArray()));
        }
Exemplo n.º 3
0
 public void HandleInitMessage(string clientNameAndVersion, IDictionary <string, object> authToken)
 {
     _packStreamWriter.WriteStructHeader(2, MsgInit);
     _packStreamWriter.Write(clientNameAndVersion);
     _packStreamWriter.Write(authToken ?? EmptyDictionary);
 }