# HG changeset patch # User riono # Date 1605891804 -32400 # Node ID 277dd59bf1e2b3df39bd3edf77182c1aaee3fb2d # Parent e4b46d4ef79c8faeebce705a0e6e3bdab5c84a47 add RemoteMessage diff -r e4b46d4ef79c -r 277dd59bf1e2 datagear/RemoteMessage.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/datagear/RemoteMessage.cs Sat Nov 21 02:03:24 2020 +0900 @@ -0,0 +1,25 @@ +using System.Net.Sockets; +using MessagePack; + +namespace Christie_net.datagear { +[MessagePackObject] +public class RemoteMessage { + [Key("type")] + public int type; // コマンドタイプ + [Key("fromDmgName")] + public string fromDmgName; // 送り元のDgmName REPLYの時に使用 + [Key("key")] + public string key; + [Key("clazz")] + public string clazz; + + public RemoteMessage(){} // for messagePack + + public RemoteMessage(int type, string fromDmgName, string key, string clazz) { + this.type = type; + this.fromDmgName = fromDmgName; + this.key = key; + this.clazz = clazz; + } +} +} \ No newline at end of file diff -r e4b46d4ef79c -r 277dd59bf1e2 datagear/command/Command.cs --- a/datagear/command/Command.cs Thu Nov 19 23:52:29 2020 +0900 +++ b/datagear/command/Command.cs Sat Nov 21 02:03:24 2020 +0900 @@ -1,6 +1,7 @@ using System; using System.IO; using Christie_net.codegear; +using Christie_net.daemon; using Christie_net.datagear.dg; namespace Christie_net.datagear.command { @@ -13,7 +14,7 @@ public CodeGear cg; // for localtake public DataGear dg; // for put/localtake/reply public Type clazz; // for remote - //public Connection connection = null; // for reply + public Connection connection = null; // for reply public Command(CommandBuilder cb) { this.type = cb.type; @@ -24,7 +25,7 @@ this.cg = cb.cg; this.dg = cb.dg; this.clazz = cb.clazz; - //this.connection = cb.connection; + this.connection = cb.connection; } // instead of any Constoractor args @@ -44,10 +45,9 @@ } public override string ToString() { - // return "Command : type = " + type.commandType + ", key = " + key + "toDgmName = " + toDgmName + - // " fromDgmName = " + fromDgmName + " cgmID = " + cgmID + " cg = " + cg + " dg = " + dg + " clazz = " + - // clazz + "connection = " + connection; - return null; + return "Command : type = " + type.commandType + ", key = " + key + "toDgmName = " + toDgmName + + " fromDgmName = " + fromDgmName + " cgmID = " + cgmID + " cg = " + cg + " dg = " + dg + " clazz = " + + clazz + "connection = " + connection; } } } \ No newline at end of file diff -r e4b46d4ef79c -r 277dd59bf1e2 datagear/command/CommandBuilder.cs --- a/datagear/command/CommandBuilder.cs Thu Nov 19 23:52:29 2020 +0900 +++ b/datagear/command/CommandBuilder.cs Sat Nov 21 02:03:24 2020 +0900 @@ -1,5 +1,6 @@ using System; using Christie_net.codegear; +using Christie_net.daemon; using Christie_net.datagear.dg; namespace Christie_net.datagear.command { @@ -12,7 +13,7 @@ protected internal CodeGear cg = null; // for localtake protected internal DataGear dg = null; // for put/localtake/reply protected internal Type clazz = null; // for remote - //protected internal Connection connection = null; // for reply + protected internal Connection connection = null; // for reply //private CommandFactory factory = new CommandFactory(); @@ -25,7 +26,7 @@ this.cg = null; this.dg = null; this.clazz = null; - //this.connection = null; + this.connection = null; return this; }