#include <stdlib.h>
-/////////////////////////////////////////////////////////////////
+// ----------------------------------------------------------------------------
// wxProtoInfo
-/////////////////////////////////////////////////////////////////
-
-/*
- * --------------------------------------------------------------
- * --------- wxProtoInfo CONSTRUCTOR ----------------------------
- * --------------------------------------------------------------
- */
+// ----------------------------------------------------------------------------
wxProtoInfo::wxProtoInfo(const wxChar *name, const wxChar *serv,
const bool need_host1, wxClassInfo *info)
#endif
}
-/////////////////////////////////////////////////////////////////
-// wxProtocol ///////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////
+
+// ----------------------------------------------------------------------------
+// wxProtocol
+// ----------------------------------------------------------------------------
#if wxUSE_SOCKETS
IMPLEMENT_ABSTRACT_CLASS(wxProtocol, wxSocketClient)
: wxSocketClient()
#endif
{
+ m_lastError = wxPROTO_NOERR;
+ SetDefaultTimeout(60); // default timeout is 60 seconds
}
#if wxUSE_SOCKETS
return true;
}
+void wxProtocol::SetDefaultTimeout(wxUint32 Value)
+{
+ m_uiDefaultTimeout = Value;
+#if wxUSE_SOCKETS
+ wxSocketBase::SetTimeout(Value); // sets it for this socket
+#endif
+}
+
+
// ----------------------------------------------------------------------------
// Read a line from socket
// ----------------------------------------------------------------------------