duplex

WCF duplex TCP communication error

岁酱吖の 提交于 2019-12-06 08:50:13
I have a sample service to test WCF net.tcp communication. It is very simple service and all it does is subscribing a client to the service and then calls callbackchannel to notify all connected clients about broadcasted message. The service is hosted inside IIS 7.5. Here is service code and test client to test it. [ServiceContract(CallbackContract = typeof(ISampleServiceCallBack), SessionMode = SessionMode.Required)] public interface ISampleCuratioService { [OperationContract(IsOneWay = true)] void SubcribeToService(string sub); [OperationContract] string GetData(int value);

WCF Duplex Communications in a clustered environment

邮差的信 提交于 2019-12-05 20:03:23
So I was looking at the sample examples people have created for Duplex Communications namely when hosted by IIS and connected to via Silverlight. There are plenty of examples of this out there ( this MSDN article is great ), but all use the same paradigm: User A connects to server A, it puts him in an in-memory list to receive future updates. User B connects to server A, it notifies all users in list that someone "logged in". ... but what happens when User C connects to server C, the in-memory list for server C doesn't contain User A or B. The problem is that I'm looking to implement this in a

WIA 2.0 Duplex property

拟墨画扇 提交于 2019-12-05 11:51:13
I am developing an aplication with C# to use the WIA 2.0 library. At the moment I could use most of the features, such as ADF (auto document feeder), filters and more. Now, I need to use the duplexer of my scanner (fujitsu). I'm trying to set the WIA_DPS_DOCUMENT_HANDLING_SELECT scanner property to the DUPLEX value. See the code below: try { bool hasMorePages = false; //determine if there are any more pages waiting Property documentHandlingSelect = null; Property documentHandlingStatus = null; foreach (Property prop in WiaDev.Properties) { if (prop.PropertyID == WIA_PROPERTIES.WIA_DPS_DOCUMENT

duplex operation between two processes using named pipes in c#

这一生的挚爱 提交于 2019-12-05 07:06:42
I am trying to use named pipes to communicate between a server and a client process on the same machine. server sends a message to client, client does something with it and returns a result, and server is supposed to get the result. here is the code for server: using System; using System.IO; using System.IO.Pipes; class PipeServer { static void Main() { using (NamedPipeServerStream pipeServer = new NamedPipeServerStream("testpipe", PipeDirection.InOut)) { Console.WriteLine("NamedPipeServerStream object created."); // Wait for a client to connect Console.Write("Waiting for client connection..."

How to implement a full duplex channel over TCP with a single thread?

南笙酒味 提交于 2019-12-05 01:45:40
问题 The network lib I'm writing needs to send and receive messages through a TCP socket. Messages can be sent or received any time, i.e should work as a full duplex channel. I was able to implement such scenario using two threads: main thread calling send() and a dedicated thread mostly blocked at recv() call. My question is: is it possible to implement the same scenario with a single thread? I.e. by registering some callback function? As a side note: I need implement this scenario in C++, Java

Change WCF default timeout

情到浓时终转凉″ 提交于 2019-12-04 10:47:58
I have here a WCF Duplex Service, the requierement is that the Callback to the client should have a timeout of 10 seconds, therefor my web.config file of the Service looks like this: <bindings> <basicHttpBinding> <binding name="simulatorEndpoint" closeTimeout="00:00:10" openTimeout="00:00:10" receiveTimeout="00:00:10" sendTimeout="00:00:10" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy=

How to implement a full duplex channel over TCP with a single thread?

£可爱£侵袭症+ 提交于 2019-12-03 17:31:21
The network lib I'm writing needs to send and receive messages through a TCP socket. Messages can be sent or received any time, i.e should work as a full duplex channel. I was able to implement such scenario using two threads: main thread calling send() and a dedicated thread mostly blocked at recv() call. My question is: is it possible to implement the same scenario with a single thread? I.e. by registering some callback function? As a side note: I need implement this scenario in C++, Java and Python. Yes, it possible. You need to use an API that allows multiplexed I/O. Under C/C++ and Python

WCF push to client through firewall? [closed]

丶灬走出姿态 提交于 2019-12-03 07:35:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . See also How does a WCF server inform a WCF client about changes? (Better solution then simple polling, e.g. Coment or long polling) I need to use push-technology with WCF through client firewalls. This must be a common problem, and I know for a fact it works in theory (see links below), but I have failed to get

Is TCP bidirectional or full-duplex?

余生颓废 提交于 2019-12-02 17:31:16
Bidirectional and full-duplex are different concepts. For example the Ethernet is only half-duplex because at a specific time, only one host can send data over the wire, and it cannot send and receive data simultaneously . So when we use TCP over an Ethernet, I think TCP is only bidirectional or half-duplex. But here it says TCP is full-duplex. Why? It's certainly bidirectional, since both parties send / receive packets. What exactly do you mean when you ask if TCP is full-duplex? Both sending and receiving packets at the same time has more to do with the physical component, while TCP is a

How to adjust audio panning with RtAudio

非 Y 不嫁゛ 提交于 2019-12-01 09:08:08
I use Rtaudio library and I would like to implement an audio program where I can control the panning (e.g. shifting the sound from the left channel to the right channel). In my specific case, I use a duplex mode (you can find an example here: duplex mode ). It means that I link the microphone input to the speaker output. Should I apply a filter on the output buffer? What kind of filter? Can anyone help me? To reduce the signal on the left, simply multiply every sample on the left by a number less than or equal to 1, let's call it l. Similarly for the right, we'll call that number r. Generally