Skip to content
tylerje edited this page Nov 5, 2014 · 10 revisions

Welcome to ServiceWire

ServiceWire is a very fast and light weight service host and dynamic client library that simplifies the development and use of high performance remote procedure call (RPC) communication between .NET processes over Named Pipes or TCP/IP.

Important

ServiceWire's dynamically generated proxy will NOT run as x86 on an x64 system. This ususally occurs when you use Visual Studio to create a console application with the default "prefer x86" in project properties selected. Just be sure to choose AnyCPU or the specific target (x86 or x64) so that you do not run 32bit in WOW on an x64 machine.

Key Features:

Documentation:

Quick Start

Write an interface like this:

 public interface IMyService
 {
     Guid GetId(string source, double weight, int quantity, DateTime dt);
     TestResponse Get(Guid id, string label, double weight, out long quantity);
     long TestLong(out long id1, out long id2);
     List<string> GetItems(Guid id);
 }

Write your implementation and then host it this easily:

 var tcphost = new TcpHost(ipEndpoint, logger, stats);
 tcphost.AddService<IMyService>(myService);
 tcphost.Open();

Then write your client code to use the service this easily:

 using (var client = new TcpClient<IMyService>(ipEndpoint))
 {
     var id = client.GetId("test1", 3.314, 42);
     int q2 = 4;
     var response = client.Get(id, "mirror", 4.123, out q2)
     var list = client.GetItems(id, new int[] { 3, 6, 9 });
 }

Key Sites