only call GSocket_Init() when needed and do call it before using GAddress_XXX
functions (fixes bug 510722) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -42,11 +42,14 @@ public:
|
||||
void SetAddress(GAddress *address);
|
||||
|
||||
// we need to be able to create copies of the addresses polymorphically (i.e.
|
||||
// wihtout knowing the exact address class)
|
||||
// without knowing the exact address class)
|
||||
virtual wxSockAddress *Clone() const = 0;
|
||||
|
||||
protected:
|
||||
GAddress *m_address;
|
||||
|
||||
private:
|
||||
void Init();
|
||||
};
|
||||
|
||||
class WXDLLEXPORT wxIPV4address : public wxSockAddress {
|
||||
|
@@ -185,6 +185,11 @@ public:
|
||||
void SetNotify(wxSocketEventFlags flags);
|
||||
void Notify(bool notify);
|
||||
|
||||
// initialize/shutdown the sockets (usually called automatically)
|
||||
static bool IsInitialized();
|
||||
static bool Initialize();
|
||||
static void Shutdown();
|
||||
|
||||
// callbacks are deprecated, use events instead
|
||||
#if WXWIN_COMPATIBILITY
|
||||
wxSockCbk Callback(wxSockCbk cbk_);
|
||||
@@ -247,6 +252,9 @@ private:
|
||||
bool m_notify; // notify events to users?
|
||||
wxSocketEventFlags m_eventmask; // which events to notify?
|
||||
|
||||
// the initialization count, GSocket is initialized if > 0
|
||||
static size_t m_countInit;
|
||||
|
||||
// callbacks are deprecated, use events instead
|
||||
#if WXWIN_COMPATIBILITY
|
||||
wxSockCbk m_cbk; // callback
|
||||
|
Reference in New Issue
Block a user