| @@ -307,8 +307,8 @@ public: | |||||
| speakerOut (kSpeakerArrEmpty), | speakerOut (kSpeakerArrEmpty), | ||||
| numInChans (JucePlugin_MaxNumInputChannels), | numInChans (JucePlugin_MaxNumInputChannels), | ||||
| numOutChans (JucePlugin_MaxNumOutputChannels), | numOutChans (JucePlugin_MaxNumOutputChannels), | ||||
| isProcessing (false) | |||||
| hasShutdown (false) | |||||
| isProcessing (false), | |||||
| hasShutdown (false), | |||||
| firstProcessCallback (true), | firstProcessCallback (true), | ||||
| shouldDeleteEditor (false), | shouldDeleteEditor (false), | ||||
| hostWindow (0) | hostWindow (0) | ||||
| @@ -519,6 +519,7 @@ | |||||
| #include <windows.h> | #include <windows.h> | ||||
| #include <windowsx.h> | #include <windowsx.h> | ||||
| #include <commdlg.h> | #include <commdlg.h> | ||||
| #include <ws2tcpip.h> | |||||
| #include <shellapi.h> | #include <shellapi.h> | ||||
| #include <mmsystem.h> | #include <mmsystem.h> | ||||
| #include <vfw.h> | #include <vfw.h> | ||||
| @@ -9187,34 +9188,37 @@ namespace SocketHelpers | |||||
| zerostruct (hints); | zerostruct (hints); | ||||
| hints.ai_family = AF_UNSPEC; | hints.ai_family = AF_UNSPEC; | ||||
| hints.ai_socktype = isDatagram ? SOCK_DGRAM : SOCK_STREAM; | hints.ai_socktype = isDatagram ? SOCK_DGRAM : SOCK_STREAM; | ||||
| hints.ai_flags = AI_NUMERICSERV; | |||||
| struct addrinfo* result = 0; | |||||
| if (getaddrinfo (hostName.toUTF8(), 0, &hints, &result) != 0 || result == 0) | |||||
| struct addrinfo* info = 0; | |||||
| if (getaddrinfo (hostName.toUTF8(), String (portNumber).toUTF8(), &hints, &info) != 0 || info == 0) | |||||
| return false; | return false; | ||||
| if (handle < 0) | if (handle < 0) | ||||
| handle = (int) socket (result->ai_family, result->ai_socktype, 0); | |||||
| handle = (int) socket (info->ai_family, info->ai_socktype, 0); | |||||
| if (handle < 0) | if (handle < 0) | ||||
| { | { | ||||
| freeaddrinfo (result); | |||||
| freeaddrinfo (info); | |||||
| return false; | return false; | ||||
| } | } | ||||
| if (isDatagram) | if (isDatagram) | ||||
| { | { | ||||
| struct sockaddr* s = new struct sockaddr(); | struct sockaddr* s = new struct sockaddr(); | ||||
| *s = *(result->ai_addr); | |||||
| *s = *(info->ai_addr); | |||||
| *serverAddress = s; | *serverAddress = s; | ||||
| freeaddrinfo (result); | |||||
| freeaddrinfo (info); | |||||
| return true; | return true; | ||||
| } | } | ||||
| freeaddrinfo (result); | |||||
| freeaddrinfo (info); | |||||
| setSocketBlockingState (handle, false); | setSocketBlockingState (handle, false); | ||||
| const int result = ::connect (handle, info->ai_addr, info->ai_addrlen); | |||||
| if (result < 0) | if (result < 0) | ||||
| { | { | ||||
| #if JUCE_WINDOWS | #if JUCE_WINDOWS | ||||
| @@ -258,34 +258,37 @@ namespace SocketHelpers | |||||
| zerostruct (hints); | zerostruct (hints); | ||||
| hints.ai_family = AF_UNSPEC; | hints.ai_family = AF_UNSPEC; | ||||
| hints.ai_socktype = isDatagram ? SOCK_DGRAM : SOCK_STREAM; | hints.ai_socktype = isDatagram ? SOCK_DGRAM : SOCK_STREAM; | ||||
| hints.ai_flags = AI_NUMERICSERV; | |||||
| struct addrinfo* result = 0; | |||||
| if (getaddrinfo (hostName.toUTF8(), 0, &hints, &result) != 0 || result == 0) | |||||
| struct addrinfo* info = 0; | |||||
| if (getaddrinfo (hostName.toUTF8(), String (portNumber).toUTF8(), &hints, &info) != 0 || info == 0) | |||||
| return false; | return false; | ||||
| if (handle < 0) | if (handle < 0) | ||||
| handle = (int) socket (result->ai_family, result->ai_socktype, 0); | |||||
| handle = (int) socket (info->ai_family, info->ai_socktype, 0); | |||||
| if (handle < 0) | if (handle < 0) | ||||
| { | { | ||||
| freeaddrinfo (result); | |||||
| freeaddrinfo (info); | |||||
| return false; | return false; | ||||
| } | } | ||||
| if (isDatagram) | if (isDatagram) | ||||
| { | { | ||||
| struct sockaddr* s = new struct sockaddr(); | struct sockaddr* s = new struct sockaddr(); | ||||
| *s = *(result->ai_addr); | |||||
| *s = *(info->ai_addr); | |||||
| *serverAddress = s; | *serverAddress = s; | ||||
| freeaddrinfo (result); | |||||
| freeaddrinfo (info); | |||||
| return true; | return true; | ||||
| } | } | ||||
| freeaddrinfo (result); | |||||
| freeaddrinfo (info); | |||||
| setSocketBlockingState (handle, false); | setSocketBlockingState (handle, false); | ||||
| const int result = ::connect (handle, info->ai_addr, info->ai_addrlen); | |||||
| if (result < 0) | if (result < 0) | ||||
| { | { | ||||
| #if JUCE_WINDOWS | #if JUCE_WINDOWS | ||||
| @@ -54,6 +54,7 @@ | |||||
| #include <windows.h> | #include <windows.h> | ||||
| #include <windowsx.h> | #include <windowsx.h> | ||||
| #include <commdlg.h> | #include <commdlg.h> | ||||
| #include <ws2tcpip.h> | |||||
| #include <shellapi.h> | #include <shellapi.h> | ||||
| #include <mmsystem.h> | #include <mmsystem.h> | ||||
| #include <vfw.h> | #include <vfw.h> | ||||