Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

将SCS升级到.net standard 2.0 #39

Merged
merged 3 commits into from
Feb 13, 2021
Merged

Conversation

NeedJustWord
Copy link
Contributor

No description provided.

@hikalkan hikalkan added this to the v1.2.0 milestone Mar 8, 2019
…sServices.Service.ScsServiceApplication的_serviceClients)一直缓存着已经断开连接的客户端,最后耗光内存。

此问题是我在配合consul做服务发现时发现的,consul的tcp健康检查会不断的连接断开,在ReceiveCallback函数报异常去执行Disconnect函数,但是Disconnect函数因为条件判断为true直接return了
@NeedJustWord
Copy link
Contributor Author

I fixed a bug about Disconnect on commit 8bf6fa8

@erkantaylan
Copy link

erkantaylan commented Jul 19, 2019

Hello sir, I am tying to test your PR, but I am getting error, I am currently testing on DotNet Core 2.2

System.TypeLoadException
  HResult=0x80131522
  Message=Could not load type 'System.Runtime.Remoting.Proxies.RealProxy' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
  Source=Scs
  StackTrace:
   at Hik.Communication.ScsServices.Client.ScsServiceClient`1..ctor(IScsClient client, Object clientObject)
   at Hik.Communication.ScsServices.Client.ScsServiceClientBuilder.CreateClient[T](ScsEndPoint endpoint, Object clientObject)
   at Eys.Service.Scs.ScsClientService..ctor(String ip, UInt16 port) in C:\...\ScsClientService.cs:line 15
   at Eys.Service.Program.Main(String[] args) in C:\...\Program.cs:line 18

My code

var endPoint = new ScsTcpEndPoint("localhost", 20000);
client = ScsServiceClientBuilder.CreateClient<IRemoteService>(endPoint); /*<-- error line*/

[ScsService]
public interface IRemoteService {
    string Ping(string message);
    string Login(string username, string password);
}

@NeedJustWord
Copy link
Contributor Author

Hello sir, I am tying to test your PR, but I am getting error, I am currently testing on DotNet Core 2.2

System.TypeLoadException
  HResult=0x80131522
  Message=Could not load type 'System.Runtime.Remoting.Proxies.RealProxy' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
  Source=Scs
  StackTrace:
   at Hik.Communication.ScsServices.Client.ScsServiceClient`1..ctor(IScsClient client, Object clientObject)
   at Hik.Communication.ScsServices.Client.ScsServiceClientBuilder.CreateClient[T](ScsEndPoint endpoint, Object clientObject)
   at Eys.Service.Scs.ScsClientService..ctor(String ip, UInt16 port) in C:\...\ScsClientService.cs:line 15
   at Eys.Service.Program.Main(String[] args) in C:\...\Program.cs:line 18

My code

var endPoint = new ScsTcpEndPoint("localhost", 20000);
client = ScsServiceClientBuilder.CreateClient<IRemoteService>(endPoint); /*<-- error line*/

[ScsService]
public interface IRemoteService {
    string Ping(string message);
    string Login(string username, string password);
}

DotNet Core uses Scs.Core instead of Scs

@hikalkan hikalkan merged commit c37ca99 into hikalkan:master Feb 13, 2021
@hikalkan
Copy link
Owner

Thanks for your implementation. I am late to merge, but better than never :) I will test it, then publish the package.

@Sire
Copy link

Sire commented Oct 3, 2023

We are using this version in production now. We had to implement this fix however: #43
When that is fixed, I recommend you publish @hikalkan

Thanks for a great library! 😀

@oleksandr-kostian
Copy link

oleksandr-kostian commented Jul 11, 2024

@hikalkan Why don't you want to update the new version in Nuget . They are compatible with framework version. I tested it and it seems like it works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants