InterprocessConnectionServer & connectionMade


#1

Hi everyone,

I have a problem with the InterprocessConnectionServer (running latest Juce). On Mac everything runs fine so far but on Windows (10) not. The server is started and listening, then a client makes a connection, on the server side createConnectionObject() is called and a connection object returned. But connectionMade is not called on that connection which lets all the rest i want to do fail. As i said, on Mac it works like a charm… Ah, all firewalls are off, so that problem is not there.

Anyone an idea what it could be?

Best,

Thomas


#2

Does the projucer’s live build work? That uses an InterprocessConnection to talk to its child process.


#3

Hi Jules,

I don’t use the live build enging and i had a look at it. It works with pipes. The InterprocessConnectionServer works with sockets and this is what is not working, at least on my Windows. On Mac no problem.

Best,

Thomas


#4

Are you setting an address in the server’s beginWaitingForSocket maybe?
Did you try with an empty string = listen to everybody?

Next check, can you connect with netcat to the port? You won’t get an answer though unless you are able to send the magic number and the packet size, but to see, if the socket actually listens…


#5

Hi Daniel,

the server is listening to everything and the socket is open. Thats why the server receives the connection from the client and calls createConnectionObject() to create the corresponding connection object on his side. On the client’s side then connectionMade() is called, but not on the server side. That confuses me, since everything works smoothly on mac with exact the same code.

Best,

Thomas


#6

I also found out now, that on both server and client side connectionMadeInt() is called and since both are configured to have the callback on the main thread, both call (new ConnectionStateMessage(…))->post();

But: Only on the client side ConnectionStateMessage::messageCallback() actually gets called.

Weird.


#7

Ha, I found what was wrong. MessageManager was not instantiated. Thats why there were no callbacks…

So everything alright with InterprocessConnection …