Add Command Assembly

Apr 5, 2014 at 3:32 AM
Edited Apr 5, 2014 at 3:33 AM

thanks for your good work, i got one question:

Is it possible to add a assembly for commands without configuration file?
                <add assembly="BasicModules"></add>
Thanks for your time
Apr 5, 2014 at 3:37 AM
Yes, there is a configuration model class was design for this purpose:
Apr 5, 2014 at 4:27 AM
Thanks for your fast reply!

I'm a bit confused on how to use this exactly and could not get it working. Do you have an example?

Apr 7, 2014 at 2:54 PM
How did you start your server? By configuration or by programming?
Apr 7, 2014 at 9:56 PM
Edited Apr 8, 2014 at 6:08 AM

my server is started by programming. Tried several things, still could not get it working.

Shortened part of start:
        MyBase.New(New DefaultReceiveFilterFactory(Of CustomReceiveFilter, BinaryRequestInfo)())
        MyBase.Setup(New ServerConfig() With {.Port = ServerPort}, LogFactory:=New CustomLogFactory())
Looked through the whole SuperSocket Project, but did not find any example or any project using the CommandAssemblyConfig.cs. I'm using version 1.6.1 and really thankful for any example.

Apr 8, 2014 at 4:56 PM
Dim serverConfig = New ServerConfig() With {.Port = ServerPort }
Dim assemblies = New List(OfType ICommandAssemblyConfig)()
assemblies.Add(New CommandAssemblyConfig() With { .Assembly = xxxx })
serverConfig.CommandAssemblies = assemblies
MyBase.Setup(serverConfig, LogFactory:=New CustomLogFactory())

Anyway, I always prefer to start by configuration.