GetAddressFromName(const wxString& serverName, const wxString& host = wxEmptyString)
{
// we always use INET sockets under non-Unix systems
-#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WXMAC__) && !defined(__WINE__)
+#if defined(__UNIX__) && !defined(__WINDOWS__) && !defined(__WINE__) && (!defined(__WXMAC__) || defined(__DARWIN__))
// under Unix, if the server name looks like a path, create a AF_UNIX
// socket instead of AF_INET one
if ( serverName.Find(_T('/')) != wxNOT_FOUND )
const wxString& serverName,
const wxString& topic)
{
+ wxSockAddress *addr = GetAddressFromName(serverName, host);
+ if ( !addr )
+ return NULL;
+
wxSocketClient *client = new wxSocketClient(SCKIPC_FLAGS);
wxSocketStream *stream = new wxSocketStream(*client);
wxDataInputStream *data_is = new wxDataInputStream(*stream);
wxDataOutputStream *data_os = new wxDataOutputStream(*stream);
- wxSockAddress *addr = GetAddressFromName(serverName, host);
- if ( !addr )
- return NULL;
-
bool ok = client->Connect(*addr);
delete addr;