GSocket *m_socket; // wxSocket socket
wxSockFlags m_flags; // wxSocket flags
wxSockType m_type; // wxSocket type
- GSocketEventFlags m_neededreq; // Specify which requet signals we need
+ wxSocketEventFlags m_neededreq; // Specify which requet signals we need
size_t m_lcount; // Last IO request size
unsigned long m_timeout; // IO timeout value
int DeferRead(char *buffer, size_t nbytes);
int DeferWrite(const char *buffer, size_t nbytes);
- void DoDefer(GSocketEvent evt);
+ void DoDefer(wxSocketNotify evt);
// Pushback library
size_t GetPushback(char *buffer, size_t size, bool peek);
public:
wxSocketEvent(int id = 0);
- wxSocketNotify SocketEvent() const { return (wxSocketNotify)m_skevt; }
+ wxSocketNotify SocketEvent() const { return m_skevt; }
wxSocketBase *Socket() const { return m_socket; }
void CopyObject(wxObject& obj_d) const;
public:
- GSocketEvent m_skevt;
+ wxSocketNotify m_skevt;
wxSocketBase *m_socket;
};
int wxSocketBase::DeferRead(char *buffer, size_t nbytes)
{
- GSocketEventFlags old_event_flags;
+ wxSocketEventFlags old_event_flags;
bool old_notify_state;
// Timer for timeout
_wxSocketInternalTimer timer;
int wxSocketBase::DeferWrite(const char *buffer, size_t nbytes)
{
- GSocketEventFlags old_event_flags;
+ wxSocketEventFlags old_event_flags;
bool old_notify_state;
// Timer for timeout
_wxSocketInternalTimer timer;
return (GSocket_DataAvailable(m_socket));
}
-void wxSocketBase::DoDefer(GSocketEvent req_evt)
+void wxSocketBase::DoDefer(wxSocketNotify req_evt)
{
int ret;
- if (req_evt == GSOCK_LOST) {
+ if (req_evt == wxSOCKET_LOST) {
Close();
m_defer_buffer = NULL;
return;
void wxSocketBase::OnRequest(wxSocketNotify req_evt)
{
wxSocketEvent event(m_id);
- GSocketEventFlags notify = EventToNotify(req_evt);
+ wxSocketEventFlags notify = EventToNotify(req_evt);
if (m_defering != NO_DEFER) {
- DoDefer((GSocketEvent)req_evt);
+ DoDefer(req_evt);
return;
}
if ((m_neededreq & notify) == notify) {
event.m_socket = this;
- event.m_skevt = (GSocketEvent) req_evt;
+ event.m_skevt = req_evt;
ProcessEvent(event);
OldOnNotify(req_evt);
}
- if ((GSocketEvent)req_evt == GSOCK_LOST)
+ if (req_evt == wxSOCKET_LOST)
Close();
}