diff options
author | fcolin | 2007-02-01 13:29:31 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 13:29:31 +0000 |
commit | afe2e7dfc1388cad991e8d38dda7d648c137aa52 (patch) | |
tree | 92bf63d2b2b34a805927aa294c7c51912638f66a /Ivy/BufferedSocket.h | |
parent | 0be65f8a110ee9bf5da9c93e0bd5b5b62b3bad0c (diff) | |
parent | 04c263c314499e38d64af9d4a1aa5e2b8d9d5ead (diff) | |
download | ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.zip ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.tar.gz ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.tar.bz2 ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.tar.xz |
modif struct svnwindows@3001
Diffstat (limited to 'Ivy/BufferedSocket.h')
-rw-r--r-- | Ivy/BufferedSocket.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Ivy/BufferedSocket.h b/Ivy/BufferedSocket.h new file mode 100644 index 0000000..851ead1 --- /dev/null +++ b/Ivy/BufferedSocket.h @@ -0,0 +1,36 @@ +// BufferedSocket.h: interface for the CBufferedSocket class.
+//
+//////////////////////////////////////////////////////////////////////
+
+
+#pragma once
+
+
+#include "ThreadedSocket.h"
+
+class CBufferedSocket : public CThreadedSocket
+{
+// DECLARE_DYNAMIC(CBufferedSocket)
+public:
+ CBufferedSocket();
+ virtual ~CBufferedSocket();
+ void OnReceive( int nErrorCode );
+ void OnSend( int nErrorCode );
+ void OnConnect(int nErrorCode);
+ virtual void OnReceive( char *line );
+ virtual void Accept(CBufferedSocket& rConnectedSocket,
+ SOCKADDR* lpSockAddr = NULL, int* lpSockAddrLen = NULL);
+ void SetSeparator( char sep );
+ void Send ( const char * data );
+protected:
+ bool connected; /* wait to be connected before sending any Data */
+ int separator;
+ /* buffer de reception de l'application */
+ long buffer_size;
+ char *buffer;
+ char *current_ptr;
+ // Buffer Emission
+ CRITICAL_SECTION m_CritSection;
+ ivy::list<ivy::string> buf_out;
+};
+
|