jacqueskang / IpcServiceFramework

.NET Core Inter-process communication framework
MIT License
358 stars 77 forks source link

Does anyone have a sample project for this? I am interested in requesting a message from a server and receiving that message #173

Closed SmackyPappelroy closed 3 years ago

SmackyPappelroy commented 3 years ago

In the supplied example there no way of configuring an endpoint to a different computer... how can you do that?

spaceisfun commented 3 years ago

@SmackyPappelroy , I use this as the IPC pipeline for Factory Orchestrator. It should show you how to setup a remote connection over TCP:

Host: https://github.com/microsoft/FactoryOrchestrator/blob/3ba82bc87e50ff12ab43fe52145eb8b877a4e6d1/src/Service/ServiceExe.cs#L47

options.IpEndpoint = IPAddress.Any;

allows any local network IP to connect.

Client:

https://github.com/microsoft/FactoryOrchestrator/blob/3ba82bc87e50ff12ab43fe52145eb8b877a4e6d1/src/ClientLibrary/FactoryOrchestratorClient.cs#L46

Uses the host IP to connect with the IPC host, as set by

options.ServerIp = IpAddress;
options.ServerPort = Port;

Factory Orchestrator uses a fork of the IPC code, as I cannot use dynamic code generation. However, the IPC source code is identical to the 3.1.0 release, but DISABLE_DYNAMIC_CODE_GENERATION is set.

Ensure you open the required port on your host OSes firewall.

You can try Factory Orchestrator here: https://microsoft.github.io/FactoryOrchestrator/get-started-with-factory-orchestrator/

SmackyPappelroy commented 3 years ago

Thanks alot!! @spaceisfun