You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code is to create a TCP network component with configuration properties and configure the rule engine script to decode messages
///The following code is to create a TCP network component with configuration properties and configure the rule engine script to ///decode messagesvarconfig=newDictionary<string,object>();
config.Add("script",@"parser.Fixed(4).Handler(""function(buffer){ var buf = BytesUtils.Slice(buffer,1,4); parser.Fixed(buffer.ReadableBytes).Result(buf); }"").Handler(""function(buffer){parser.Result(buffer).Complete();}"")");varnetwork= serviceProvider.ServiceProvoider.GetInstances<INetworkProvider<TcpServerProperties>>().CreateNetwork(new TcpServerProperties
{ParserType= PayloadParserType.Script,PayloadType= PayloadType.String,Host="127.0.0.1",Port=322,ParserConfiguration=config});
network.StartAsync();
The following code is used to create a TCP network component with configuration properties and configure direct to decode messages
The following code is to create a TCP network component with configuration properties and configure the rule engine script to decode messages
The following code is used to create a TCP network component with configuration properties and configure direct to decode messages
There are also two types of payload parser: fixedlength and delimited
Create tcp service for message processing
script parser test
direct parser test
The text was updated successfully, but these errors were encountered: