Rename the server implementation and update client/server pipes to use the shared server-methods interface. Move PipeConstants alongside it and log “Client started.” during client startup.
20 lines
476 B
C#
20 lines
476 B
C#
using System.Numerics;
|
|
|
|
namespace ClientServerShared;
|
|
|
|
public interface IServerMethods
|
|
{
|
|
int Add(int a, int b);
|
|
Vector3 AddVector(Vector3 a, Vector3 b);
|
|
double Divide(double a, double b);
|
|
Task<string> EchoAsync(string text);
|
|
Task<int> SlowOperationAsync(int delayMs, Guid operationId);
|
|
void CancelOperation(Guid operationId);
|
|
void Crash(int exitCode);
|
|
}
|
|
|
|
public static class PipeConstants
|
|
{
|
|
public const string PipeNameArgPrefix = "--pipe=";
|
|
}
|