// Copyright: (C) 1999-1997, Guilhem Lavaux
// (C) 1999-2000, Guillermo Rodriguez Garcia
// (C) 2008 Vadim Zeitlin
-// RCS_ID: $Id$
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
{
wxSockAddressStorage from;
WX_SOCKLEN_T fromlen = sizeof(from);
- const SOCKET fd = accept(m_fd, &from.addr, &fromlen);
+ const wxSOCKET_T fd = accept(m_fd, &from.addr, &fromlen);
// accepting is similar to reading in the sense that it resets "ready for
// read" flag on the socket
return;
}
- // Notice that we need a cast as SOCKET is 64 bit under Win64 and that the
- // cast is safe because a SOCKET is a handle and so limited to 32 (or,
- // actually, even 24) bit values anyhow.
+ // Notice that we need a cast as wxSOCKET_T is 64 bit under Win64 and that
+ // the cast is safe because a wxSOCKET_T is a handle and so limited to 32
+ // (or, actually, even 24) bit values anyhow.
wxLogTrace( wxTRACE_Socket, wxT("wxSocketServer on fd %u"),
static_cast<unsigned>(m_impl->m_fd) );
}
return DoWait(seconds, milliseconds, wxSOCKET_CONNECTION_FLAG) == 1;
}
+wxSOCKET_T wxSocketBase::GetSocket() const
+{
+ wxASSERT_MSG( m_impl, wxS("Socket not initialised") );
+
+ return m_impl->m_fd;
+}
+
+
bool wxSocketBase::GetOption(int level, int optname, void *optval, int *optlen)
{
wxASSERT_MSG( m_impl, wxT("Socket not initialised") );