public IPCSyncHelperMessage(string ownerFullUri, Type ownerType, IIPCGUID id) : base(id) { RealMessageID = id; OwnerType = ownerType; OwnerFullUri = ownerFullUri; }
public IPCSyncHelperMessage(string ownerFullUri, Type ownerType, IIPCGUID id) : base(id) { RealMessageID = id; OwnerType = ownerType; OwnerFullUri = ownerFullUri; }
private static void ForwardResponce(IIPCMessage message, IIPCGUID receaver) { using (BaseIPCDispatcher dispatcher = new BaseIPCDispatcher(receaver)) { if (dispatcher.Dispatch(message) == IPCDispatchResult.Success) Console.WriteLine("Message has been forwarded succesfully!"); else Console.WriteLine("Unable to forward message"); } }
private static void ForwardResponce(IIPCMessage message, IIPCGUID receaver) { using (BaseIPCDispatcher dispatcher = new BaseIPCDispatcher(receaver)) { if (dispatcher.Dispatch(message) == IPCDispatchResult.Success) { Console.WriteLine("Message has been forwarded succesfully!"); } else { Console.WriteLine("Unable to forward message"); } } }
public BaseIPCDispatcher(IIPCGUID receaverID) { // create receaver wait handle _receaverID = receaverID; _receaverWaitHandle = new EventWaitHandle(false, EventResetMode.AutoReset, _receaverID.Value); // create dispatcher wait handle _dispatcherID = new IPCDispatcherGUID(); _dispatcherWaitHandle = new EventWaitHandle(false, EventResetMode.AutoReset, _dispatcherID.Value); if (!ChannelServices.RegisteredChannels.Any(i => i == clientChannel)) { ChannelServices.RegisterChannel(clientChannel, true); } }
public BaseIPCDispatcher(IIPCGUID receaverID) { // create receaver wait handle _receaverID = receaverID; _receaverWaitHandle = new EventWaitHandle(false, EventResetMode.AutoReset, _receaverID.Value); // create dispatcher wait handle _dispatcherID = new IPCDispatcherGUID(); _dispatcherWaitHandle = new EventWaitHandle(false, EventResetMode.AutoReset, _dispatcherID.Value); if (!ChannelServices.RegisteredChannels.Any(i => i == clientChannel)) { ChannelServices.RegisterChannel(clientChannel, true); } }
public BaseIPCReceaver() { _ownGUID = new IPCReceaverGUID(); _currentWaitHandle = new EventWaitHandle(false, EventResetMode.AutoReset, _ownGUID.Value); _currentQueue = DoCreateQueue(); // do not use security // ensure that IPC server is alive if (!ChannelServices.RegisteredChannels.Any(i => i.ChannelName == _ownGUID.Value)) { channel = new IpcServerChannel(_ownGUID.Value, _ownGUID.Value); if (!ChannelServices.RegisteredChannels.Any(i => i == channel)) { ChannelServices.RegisterChannel(channel, false); } } RemotingServices.Marshal(_currentQueue, _currentQueue.UriSuffix, typeof(IPCBaseMessagesQueue)); _worker = new Thread(ListenQueue); _worker.Start(); }
public BaseIPCReceaver() { _ownGUID = new IPCReceaverGUID(); _currentWaitHandle = new EventWaitHandle(false, EventResetMode.AutoReset, _ownGUID.Value); _currentQueue = DoCreateQueue(); // do not use security // ensure that IPC server is alive if (!ChannelServices.RegisteredChannels.Any(i => i.ChannelName == _ownGUID.Value)) { channel = new IpcServerChannel(_ownGUID.Value, _ownGUID.Value); if (!ChannelServices.RegisteredChannels.Any(i => i == channel)) { ChannelServices.RegisterChannel(channel, false); } } RemotingServices.Marshal(_currentQueue, _currentQueue.UriSuffix, typeof(IPCBaseMessagesQueue)); _worker = new Thread(ListenQueue); _worker.Start(); }
public TestAsyncComplexMessage(IIPCGUID senderID, ComplexSharedClass additionalInfo) : base(senderID) { _additionalnfo = additionalInfo; }
public IPCBaseAsyncMessage(IIPCGUID senderID) { _senderID = senderID; _isValid = DoValidateMessage(); }
public TestAsyncComplexMessage(IIPCGUID senderID, ComplexSharedClass additionalInfo) : base(senderID) { _additionalnfo = additionalInfo; }
public IPCBaseSyncMessage(IIPCGUID senderID, int timeout) { _senderID = senderID; _timeout = timeout; }
public IPCUri(IIPCGUID sharedObjGuid, string suffix) { _sharedObjGuid = sharedObjGuid; _suffix = suffix; }
public IPCUri(IIPCGUID sharedObjGuid, IIPCSharedObject suffix) { _sharedObjGuid = sharedObjGuid; _suffix = suffix.UriSuffix; }
public TestSyncMessage(IIPCGUID senderID, int timeout = IPCBaseSyncMessage.InfiniteTimeout) : base(senderID, timeout) { }
public TestAsyncMessage(IIPCGUID senderID) : base(senderID) { }
public IPCBaseAsyncMessage(IIPCGUID senderID) { _senderID = senderID; _isValid = DoValidateMessage(); }
public bool Equals(IIPCGUID other) { return String.Equals(other.Value, Value); }
public IPCUri(IIPCGUID sharedObjGuid, string suffix) { _sharedObjGuid = sharedObjGuid; _suffix = suffix; }
public TestSyncMessage(IIPCGUID senderID, int timeout = IPCBaseSyncMessage.InfiniteTimeout) : base(senderID, timeout) { }
public IPCBaseSyncMessage(IIPCGUID senderID, int timeout) { _senderID = senderID; _timeout = timeout; }
public IPCUri(IIPCGUID sharedObjGuid, IIPCSharedObject suffix) { _sharedObjGuid = sharedObjGuid; _suffix = suffix.UriSuffix; }
public TestAsyncMessage(IIPCGUID senderID) : base(senderID) { }
public TestInvalidMessage(IIPCGUID senderID) : base(senderID) { }
public bool Equals(IIPCGUID other) { return(String.Equals(other.Value, Value)); }
public TestInvalidMessage(IIPCGUID senderID) : base(senderID) { }