summaryrefslogtreecommitdiff
path: root/indra/llmessage/lliosocket.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage/lliosocket.h')
-rwxr-xr-x[-rw-r--r--]indra/llmessage/lliosocket.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/indra/llmessage/lliosocket.h b/indra/llmessage/lliosocket.h
index 6806e5084a..f840f0275c 100644..100755
--- a/indra/llmessage/lliosocket.h
+++ b/indra/llmessage/lliosocket.h
@@ -38,10 +38,14 @@
*/
#include "lliopipe.h"
+#include "llwin32headerslean.h"
#include "apr_pools.h"
#include "apr_network_io.h"
#include "llchainio.h"
+extern const std::string CONTEXT_REMOTE_HOST;
+extern const std::string CONTEXT_REMOTE_PORT;
+
class LLHost;
/**
@@ -145,18 +149,25 @@ public:
*/
apr_socket_t* getSocket() const { return mSocket; }
-protected:
/**
+ * @brief Set default socket options, with SO_NONBLOCK = 0 and a timeout in us.
+ * @param timeout Number of microseconds to wait on this socket. Any
+ * negative number means block-forever. TIMEOUT OF 0 IS NON-PORTABLE.
+ */
+ void setBlocking(S32 timeout);
+
+ /**
+ * @brief Set default socket options, with SO_NONBLOCK = 1 and timeout = 0.
+ */
+ void setNonBlocking();
+
+protected:
+ /**
* @brief Protected constructor since should only make sockets
* with one of the two <code>create()</code> calls.
*/
LLSocket(apr_socket_t* socket, apr_pool_t* pool);
- /**
- * @brief Set default socket options.
- */
- void setOptions();
-
public:
/**
* @brief Do not call this directly.