private void NewServer() { server = new NamedPipeServer(Properties.Resources.name_pipe); server.StartListen(); server.ClientConnected += ServerOnClientConnected; server.ClientDisconnected += ServerOnClientDisconnected; }
public void CanConnectToServer() { var server = new NamedPipeServer(PipeName); server.StartListen(); var client = new NamedPipeClient(PipeName, TimeSpan.FromSeconds(2)); client.ConnectAsync().Result.ShouldBeTrue(); }
static void Main(string[] args) { var server = new NamedPipeServer("npstest"); server.StartListen(); while (true) { var bytes = server.AwaitSingleMessageAsync <byte[]>().Result; } }