Subversion Repositories svn.mios32

Rev

Rev 1078 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1078 Rev 1724
Line 1... Line 1...
1
/* -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- */
1
/* -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- */
2
// $Id: UdpSocket.cpp 1078 2010-09-24 20:17:30Z tk $
2
// $Id: UdpSocket.cpp 1724 2013-03-28 20:23:40Z tk $
3
/*
3
/*
4
 * UDP Socket
4
 * UDP Socket
5
 *
5
 *
6
 * We don't use the Juce based DatagramSocket since it behaves sometimes strange
6
 * We don't use the Juce based DatagramSocket since it behaves sometimes strange
7
 * (e.g. hangups) and since it seems that it isn't made for exchanging datagrams
7
 * (e.g. hangups) and since it seems that it isn't made for exchanging datagrams
Line 73... Line 73...
73
73
74
    // get IP address from name
74
    // get IP address from name
75
#if JUCE_MAJOR_VERSION==1 && JUCE_MINOR_VERSION<51
75
#if JUCE_MAJOR_VERSION==1 && JUCE_MINOR_VERSION<51
76
    remoteHostInfo = gethostbyname((const char *)remoteHost);
76
    remoteHostInfo = gethostbyname((const char *)remoteHost);
77
#else
77
#else
78
    remoteHostInfo = gethostbyname(remoteHost.toCString());
78
    remoteHostInfo = gethostbyname(remoteHost.toUTF8().getAddress());
79
#endif
79
#endif
80
80
81
    // This looks to be required in windows as remoteHostInfo is null if the host is not found
81
    // This looks to be required in windows as remoteHostInfo is null if the host is not found
82
    // and that will cause an exception in the memcpy() below
82
    // and that will cause an exception in the memcpy() below
83
    if (remoteHostInfo == NULL) {
83
    if (remoteHostInfo == NULL) {