Hprose Tcp asp.net c# 如何使用
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | //server端 public class HelloClass { public string GetHello() { return "Hello!" ; } } public interface IHelloClass { string GetHello(); } var tcpserver = new HproseTcpListenerServer( string .Format( "tcp4://127.0.0.1:4321/" , ipPort)); var newClass = new HelloClass(); tcpserver.Add(newClass, newClass.GetType(), newClass.GetType().Name); |
1 2 3 4 5 | //client端 string api = "tcp4://127.0.0.1:4321/" ; Hprose.Client.HproseClient client = Hprose.Client.HproseClient.Create(api); var result1 = client.UseService<IHelloClass>( "HelloClass" ).GetHello(); |
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决