this is my server code
await using var server = new PipeServer<string>("H.Ipc");
var service = new ActionService();
service.Initialize(server);
server.ClientConnected += (s, e) =>
{
Console.WriteLine("Client connected");
};
server.ClientDisconnected += (s, e) =>
{
Console.WriteLine("Client disconnected");
};
await server.StartAsync();
this is my client code
await using var client = new PipeClient<string>("H.Ipc");
var service = new ActionServerClient();
service.Initialize(client);
await client.ConnectAsync();
await service.InvokeAsync("你好!");
I initiated them in two separate processes and found that the client could never connect to the server.Here are more interface definitions.
public interface IActionService
{
public Task<string> InvokeAsync(string value);
}
[H.IpcGenerators.IpcServer]
public partial class ActionService : IActionService
{
public Task<string> InvokeAsync(string value)
{
return Task.FromResult($"hello!{value}");
}
}
[H.IpcGenerators.IpcClient]
public partial class ActionServerClient:IActionService
{
}
To be honest, this project is really great.🤗 I think the problem lies in my code invocation. Thank you.😶
this is my server code
this is my client code
I initiated them in two separate processes and found that the client could never connect to the server.Here are more interface definitions.
To be honest, this project is really great.🤗 I think the problem lies in my code invocation. Thank you.😶