推广您的产品

外观
基于FreeIM开发的即时通讯服务端项目,业务和推送分离设计,终端连接永不更新重启
MyImServer
,业务代码全部在MyApp
项目编写,因此重启MyApp
项目不会造成连接断开。每个
MyImServer
管理着对应的终端连接,当接收到redis
订阅消息后,向对应的终端连接推送数据。当业务应用
imconfig.json
开启 im 时,同时要启动 im 服务器集群地址中的 im 服务端项目
dotnet new install ZhonTai.Template.IMServer
升级模板命令和安装模板命令相同
dotnet new install ZhonTai.Template.IMServer::9.0.2
dotnet new MyIMServer -h
-p, --port <port> Port settings
类型: int
默认: 17010
dotnet new uninstall ZhonTai.Template.IMServer
dotnet new MyIMServer -n MyCompanyName.MyIMServer
dotnet new MyIMServer -n MyCompanyName.MyIMServer -p 17010
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ImServerOptions": {
"RedisClient": "127.0.0.1:6379,password=,poolsize=10,defaultDatabase=6",
"Servers": "127.0.0.1:6010",
"Server": "127.0.0.1:6010"
}
}
注意
redis
默认数据库必须要和业务应用 imconfig.json
中的默认数据库保存一致
{
"profiles": {
"MyIMServer.Host": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": true,
"applicationUrl": "http://localhost:17010"
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
},
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:17010",
"sslPort": 0
}
}
}