Skip to content

Processes cannot communicate or access each other. #8

Description

@BlameTwo

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
{
}
Image

To be honest, this project is really great.🤗 I think the problem lies in my code invocation. Thank you.😶

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions