Win32 Sockets / pipes


#1

Sorry if this was discussed before. I’m working on my first networked JUCE app. Other non-JUCE programs will possibly connect to mine.

Has anyone tried to connect to JUCE with a third-party win32 socket lib? I tried a few, I can connect with some, but messages don’t get through. Two instances of my lame alpha JUCE program can talk over sockets or named pipes with each other without a hitch.

My assumptuion is that JUCE uses INET communication and TCP protocol - rather than datagrams. Is this correct?

Thanks in advance

Laszlo


#2

No, if you’re using the Socket class, then it’s just using the standard socket library, nothing unusual about it.


#3

Sorry for the late reply, been traveling.

I ended up making a JUCE dll with just the bare minimum for communication, so anybody trying to connect to the server app, doesn’t need to reinvent the wheel with sockets + encrypt / parse messages. Only simple dll calls.

To be honest, I was a bit afraid of the JUCE & DLL combo, but it works beautifully. I read some posts about avoiding dll’s with JUCE, but it dll’s do have their place. Even simple gui calls work near perfect (custom look, splash, alertwindow, taskbar icon, etc.) after initialising the GUI with no JUCEApplication running.


#4

One last comment about DLL’s. I noticed if I want to use the same socket DLL I built with JUCE GUI, calling it from another JUCE GUI application gave run-time errors (no time to chase this further). But if I compile the DLL without JUCE GUI functions (InitialiseJuce_NonGUI() etc.), the calls work fine without crashes.

Just in case anybody has to use JUCE DLL from a JUCE GUI app.