Open sjTwoDogSon opened 2 years ago
No, when get command by key failed, it will just return. https://github.com/kerryjiang/SuperSocket/blob/master/src/SuperSocket.Command/CommandMiddleware.cs#L199
protected virtual async ValueTask HandlePackage(IAppSession session, TPackageInfo package)
{
if (!_commands.TryGetValue(package.Key, out ICommandSet commandSet))
{
return;
}
await commandSet.ExecuteAsync(session, package);
}
And in v1.6 https://github.com/kerryjiang/SuperSocket/blob/v1.6/SocketBase/AppServerBase.cs#L1287
var commandProxy = GetCommandByName(requestInfo.Key);
if (commandProxy != null)
{}
else
{
session.InternalHandleUnknownRequest(requestInfo);
}
sorry, I want to directly process in the customized session. is there any good way
Then you have to write your own code, as SuperSocket does not support the feature you required.
1.6.6.1 version has 'InternalHandleUnknownRequest' and 'HandleUnknownRequest' in AppSession however, version 2.0.0-beta.11 does not In version 1.6.6.1, I used it to filter instructions not requested by standard protocols,is there a method similar to this in version 2.0.0-beta.11? I can't find it,I also need to record the address and SessionID of the request I hope you can help me out of your busy schedule. Thank you very much