dotnet / WatsonTcp

WatsonTcp is the easiest way to build TCP-based clients and servers in C#.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Send metadata with a Non-WatsonTcp Endpoint

teoAlivanoglou opened this issue · comments

I read through FRAMING.MD and I can't figure out how to include metadata from my non-WatsonTcp client.

So far I've tried these two json headers:

"{"len":1337,"status":"Normal","metadata":{"fileName":"Foobar"}}"

"{"len":1337,"status":"Normal","fileName":"Foobar"}"

In both cases, args.Metadata is not set. Is it even possible?

Hi @teoAlivanoglou please try setting it to "md":{...}. Looks like it may be a documentation error.

        /// <summary>
        /// Metadata dictionary; contains user-supplied metadata.
        /// </summary>
        [JsonPropertyName("md")]  <----
        public Dictionary<string, object> Metadata { get; set; } = null;

Just added some more detail to FRAMING.md - thanks for bringing to my attention! Also please re-open if any issues.

Thank you very much!