Upgrade from SuperSocket 1.4

    • ICommandInfo => IRequestInfo
    • ICommandInfo.Data => IRequestInfo.Body
    • BinaryCommandInfo => BinaryRequestInfo
    • StringCommandInfo => StringRequestInfo
    • ICustomProtocol => IReceiveFilter
    • AppSession.SendResponse() => AppSession.Send()
    • AppSession.StartSession() => AppSession.OnSessionStarted()
    • AppSession.HandleExceptionalError(Exception e) => AppSession.HandleException(Exception e)
    • AppServer.OnAppSessionClosed(TAppSession session, CloseReason reason) => AppServer.OnSessionClosed(TAppSession session, CloseReason reason)
    • Section name was changed: "socketServer" => "superSocket"

    Configuration of v1.4:

    New configuration:

    1. <configuration>
    2. <configSections>
    3. <section name="superSocket" type="SuperSocket.SocketEngine.Configuration.SocketServiceConfig, SuperSocket.SocketEngine"/>
    4. </configSections>
    5. <appSettings>
    6. <add key="ServiceName" value="GPSSocketServer"/>
    7. <superSocket>
    8. ....
    9. </superSocket>
    10. <startup>
    11. <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
    12. </startup>
    13. </configuration>
    • The attribute "mode"'s available values are changed from "Sync/Async/Udp" to "Tcp/Udp":

    v1.5:

    • The node "services" was changed to be "serverTypes":

    v1.4:

    1. <socketServer>
    2. ...
    3. <services>
    4. <service name="GPSSocketService"
    5. type="SuperSocket.QuickStart.GPSSocketServer.GPSServer, SuperSocket.QuickStart.GPSSocketServer" />
    6. </services>
    7. </socketServer>
    1. <superSocket>
    2. ...
    3. <serverTypes>
    4. <add name="GPSSocketService"
    5. </serverTypes>
    6. </superSocket>
    • The attribute "serviceName" of server node was changed to be "serverTypeName":

    v1.4:

    New:

    1. serverTypeName="GPSSocketService"
    2. ip="Any" port="2012">
    3. </server>
    • Logger.LogInfo() => Logger.Info();
    • Logger.LogDebug() => Logger.Debug();
    • Logger.LogError() => Logger.Error();
    1. var serverConfig = ConfigurationManager.GetSection("socketServer") as SocketServiceConfig;
    2. if (!SocketServerManager.Initialize(serverConfig))
    3. {
    4. race.WriteLine("Failed to initialize SuperSocket!", "Error");
    5. return false;
    6. }
    7. if (!SocketServerManager.Start())
    8. {
    9. Trace.WriteLine("Failed to start SuperSocket!", "Error");
    10. }

    The new bootstrap: