public RemoteRequestListener2(IZmqContext context, string endpoint, int workers, LocalInvocationDispatcher dispatcher, SerializationStrategy serializationStrategy) { _endpoint = endpoint; _dispatcher = dispatcher; _serializationStrategy = serializationStrategy; _reply = context.Rep(); }
public void Init() { _service = new StubService(); _dispatcher = new LocalInvocationDispatcher(service => { if (service == serviceName) { return(Tuple.Create <object, Type>(_service, _service.GetType())); } throw new Exception("service not found"); }, new ProtoBufSerializationStrategy()); }
public RemoteRequestListener(IZmqContext context, string endpoint, int workers, LocalInvocationDispatcher dispatcher, SerializationStrategy serializationStrategy) { this._context = context; this._endpoint = endpoint; this._workers = workers; this._dispatcher = dispatcher; this._serializationStrategy = serializationStrategy; var count = Interlocked.Increment(ref localAddUseCounter); this._localEndpoint = "inproc://rrworker_" + count; }