#include "wx/app.h"
#include "wx/utils.h"
#include "wx/timer.h"
+ #include "wx/module.h"
#endif
#include "wx/apptrait.h"
-#include "wx/module.h"
#include "wx/sckaddr.h"
#include "wx/datetime.h"
// Create the socket
m_socket = GSocket_new();
- if(!m_socket)
+ if (!m_socket)
{
wxFAIL_MSG( _T("datagram socket not new'd") );
return;
}
// Setup the socket as non connection oriented
m_socket->SetLocal(addr.GetAddress());
- if( m_socket->SetNonOriented() != GSOCK_NOERROR )
+ if (flags & wxSOCKET_REUSEADDR)
+ {
+ m_socket->SetReusable();
+ }
+ if ( m_socket->SetNonOriented() != GSOCK_NOERROR )
{
delete m_socket;
m_socket = NULL;