Page MenuHomePhabricator (Chris)

No OneTemporary

Authored By
Unknown
Size
19 KB
Referenced Files
None
Subscribers
None
diff --git a/src/OnlineChatBE.cpp b/src/OnlineChatBE.cpp
new file mode 100755
index 0000000..afa3746
--- /dev/null
+++ b/src/OnlineChatBE.cpp
@@ -0,0 +1,75 @@
+//
+// C++ Implementation: onlinechatbe
+//
+// Description:
+//
+//
+// Author: upi <upi@feel>, (C) 2004
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+/*
+#include "OnlineChatBE.h"
+#include "common.h"
+#include "SDL_net.h"
+
+class COnlineChatBEImpl: public IOnlineChatBE
+{
+protected:
+ ConnectionStateEnum m_enConnectionState;
+
+public:
+ // Lifecycle control
+ COnlineChatBEImpl();
+ virtual ~COnlineChatBEImpl() {}
+
+ // Connection
+
+ virtual void connect( std::string a_sNick );
+ virtual void disconnect();
+ virtual ConnectionStateEnum getConnectionState() const;
+
+ // Getting/setting my connection parameters
+
+ virtual std::string getMyNick() const;
+ virtual void setMyNick( std::string a_sNick );
+ virtual ClientModeEnum getMyClientMode() const;
+ virtual void setMyClientMode( ClientModeEnum a_enClientMode );
+ virtual const UserInfo& getMyUserInfo() const; ///< Same as getUserInfo(0)
+
+ // User control
+
+ virtual int getUserCount() const;
+ virtual const UserInfo& getUserInfo( int a_iUserNumber ) const;
+ virtual ClientModeEnum getClientMode() const;
+ virtual void setClientMode( ClientModeEnum a_newMode );
+
+ // Event sinks
+
+ virtual void addEventSink( IOnlineEventSink* a_poSink );
+ virtual void removeEventSink( IOnlineEventSink* a_poSink );
+ virtual void removeAllEventSinks();
+};
+
+COnlineChatBEImpl::COnlineChatBEImpl()
+{
+ m_enConnectionState = CS_Disconnected;
+}
+
+void COnlineChatBEImpl::connect( std::string a_sNick )
+{
+ if ( m_enConnectionState != CS_Disconnected )
+ {
+ debug( "COnlineChatBEImpl::connect: Not in disconnected state!\n" );
+ return;
+ }
+ m_enConnectionState = CS_Connecting;
+
+
+}
+
+void COnlineChatBEImpl::disconnect()
+{
+}
+*/
\ No newline at end of file
diff --git a/src/OnlineChatBE.h b/src/OnlineChatBE.h
new file mode 100755
index 0000000..acd45c4
--- /dev/null
+++ b/src/OnlineChatBE.h
@@ -0,0 +1,142 @@
+//
+// C++ Interface: onlinechatbe
+//
+// Description:
+//
+//
+// Author: upi <upi@apocalypse.rulez.org>, (C) 2004
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef ONLINECHATBE_H
+#define ONLINECHATBE_H
+
+
+#include <string>
+
+
+class IOnlineEventSink;
+struct SOnlineChatBE_P;
+
+/**
+This is a backend class which implements communication services with the MortalNet backend.
+
+The backend doesn't provide any frontend or interactivity and is meant to run independently in its own thread.
+
+\author upi
+\ingroup Network
+*/
+class IOnlineChatBE
+{
+public:
+ enum ConnectionStateEnum
+ {
+ CS_Disconnected, ///< The backend is not connected to the server.
+ CS_Connecting, ///< The backend is trying to connect to the server.
+ CS_Connected, ///< Connected.
+ CS_Disconnecting,
+ };
+
+ enum ClientModeEnum
+ {
+ CM_Chatroom, ///< The user is rotting away in the chatroom
+ CM_Game, ///< The user is playing a game. He'll be back.
+ CM_Away, ///< The user is not at all here, he just left his client running
+ CM_WaitingForChallenge, ///< The user is not running the game, but is waiting for a challenge.
+ };
+
+ enum ChatEventEnum
+ {
+ CE_Nothing,
+ CE_MyNick, ///< You are now known as...
+ CE_Challenge, ///< Challenged by user X
+ CE_Message, ///< Message from user X
+ CE_Joins, ///< User X has joined MortalNet
+ CE_Leaves, ///< User X has left MortalNet
+ CE_NickChange, ///< User X is now known as Y
+ CE_ServerMessage, ///< Miscellaneous info from server
+ };
+
+ struct UserInfo
+ {
+ std::string m_sNick; ///< The name of the user
+ ClientModeEnum m_enClientMode; ///< The client mode of the user
+ std::string m_sHostName; ///< The hostname that is displayed for the user (reverse lookup by MortalNet)
+ std::string m_sHostAddress; ///< The host address string of the user (IPV4 or IPV6 number).
+
+ UserInfo();
+ UserInfo( const UserInfo& a_roRhs );
+ UserInfo& operator=( const UserInfo& a_roRhs );
+ };
+
+ struct SChatEvent
+ {
+ ChatEventEnum m_enEvent;
+ UserInfo m_sUser;
+ std::string m_sMessage;
+ };
+
+protected:
+
+ // Lifecycle control
+ IOnlineChatBE() {}
+ virtual ~IOnlineChatBE() {}
+
+public:
+ static void create();
+
+ // Connection
+
+ virtual void connect( std::string a_sNick ) = 0;
+ virtual void disconnect() = 0;
+ virtual ConnectionStateEnum getConnectionState() const = 0;
+
+ // Getting/setting my connection parameters
+
+ virtual std::string getMyNick() const = 0;
+ virtual void setMyNick( std::string a_sNick ) = 0;
+ virtual ClientModeEnum getMyClientMode() const = 0;
+ virtual void setMyClientMode( ClientModeEnum a_enClientMode ) = 0;
+ virtual const UserInfo& getMyUserInfo() const = 0; ///< Same as getUserInfo(0)
+
+ // User control
+
+ virtual int getUserCount() const = 0;
+ virtual const UserInfo& getUserInfo( int a_iUserNumber ) const = 0;
+ virtual ClientModeEnum getClientMode() const = 0;
+ virtual void setClientMode( ClientModeEnum a_newMode ) = 0;
+
+ // Event sinks
+
+ virtual void addEventSink( IOnlineEventSink* a_poSink ) = 0;
+ virtual void removeEventSink( IOnlineEventSink* a_poSink ) = 0;
+ virtual void removeAllEventSinks() = 0;
+};
+
+
+extern IOnlineChatBE* g_poChatBE;
+
+
+
+/** IBackendEventSink is an interface for receiving events from IOnlineChatBE.
+Every backend event sink which is registered to g_poChatBE will be notified of
+chat events as they occur. This is done with the receiveEvent() method.
+*/
+
+class IOnlineEventSink
+{
+public:
+ IOnlineEventSink() {}
+ virtual ~IOnlineEventSink() {}
+
+ virtual void receiveEvent( const IOnlineChatBE::SChatEvent& a_roEvent ) = 0;
+ virtual void connectionStateChange( IOnlineChatBE::ConnectionStateEnum a_enOldState,
+ IOnlineChatBE::ConnectionStateEnum a_enNewState,
+ const std::string& a_rsMessage ) = 0;
+};
+
+
+
+
+#endif
diff --git a/src/OnlineChatBEImpl.cpp b/src/OnlineChatBEImpl.cpp
new file mode 100755
index 0000000..8c67beb
--- /dev/null
+++ b/src/OnlineChatBEImpl.cpp
@@ -0,0 +1,481 @@
+//
+// C++ Implementation: COnlineChatBEImpl
+//
+// Description:
+//
+//
+// Author: upi <upi@feel>, (C) 2004
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#include "OnlineChatBEImpl.h"
+#include "common.h"
+
+
+#define MORTALNETSERVER "apocalypse.game-host.org"
+#define MORTALNETWORKPORT 0x3A23
+
+IOnlineChatBE* g_poChatBE = NULL;
+
+class Guard {
+public:
+ Guard( SDL_mutex* a_poMutex ) : m_poMutex( a_poMutex ) { SDL_mutexP( m_poMutex ); }
+ ~Guard() { SDL_mutexV( m_poMutex ); }
+protected:
+ SDL_mutex* m_poMutex;
+};
+
+
+
+///////////////////////////////////////////////////////////////////////////
+// Constructor - destructor
+///////////////////////////////////////////////////////////////////////////
+
+
+
+
+COnlineChatBEImpl::COnlineChatBEImpl()
+{
+ m_enConnectionState = m_enNotifiedState = CS_Disconnected;
+ m_enClientMode = CM_Chatroom;
+
+ m_poSocket = NULL;
+ m_poSocketSet = NULL;
+ m_iIncomingBufferSize = 0;
+
+
+ UserInfo* poMyInfo = new UserInfo;
+ poMyInfo->m_enClientMode = m_enClientMode;
+ m_apoUsers.push_front( poMyInfo ); // The first user is always "me"
+
+ m_poLock = SDL_CreateMutex();
+}
+
+
+COnlineChatBEImpl::~COnlineChatBEImpl()
+{
+ SDL_DestroyMutex( m_poLock );
+ m_poLock = NULL;
+}
+
+
+///////////////////////////////////////////////////////////////////////////
+// Internal methods that run in the communication thread
+///////////////////////////////////////////////////////////////////////////
+
+
+/** internalConnect establishes the connection to the server. It is
+assumed that the client is NOT connected before this method is called.
+Successful execution sets the m_poSocket and other connection related
+attributes, and the m_enConnectionState to CS_Connected
+*/
+
+void COnlineChatBEImpl::internalConnect()
+{
+ m_enConnectionState = CS_Connecting;
+
+ // 1. RESOLVE MORTALNETSERVER
+
+ notifyConnectionState( std::string(Translate("Resolving host: ")) + MORTALNETSERVER );
+
+ IPaddress oAddress;
+ int iResult = SDLNet_ResolveHost( &oAddress, MORTALNETSERVER, MORTALNETWORKPORT );
+ if ( iResult )
+ {
+ notifyConnectionState( Translate("Couldn't resolve host.") );
+ return;
+ }
+ debug( "IP Address of server is 0x%x\n", oAddress.host );
+
+ Uint32 ipaddr=SDL_SwapBE32(oAddress.host);
+
+ char acMessage[128];
+ sprintf( acMessage, "%s %d.%d.%d.%d port %d", Translate("Connecting to"),
+ ipaddr>>24, (ipaddr>>16)&0xff, (ipaddr>>8)&0xff, ipaddr&0xff, oAddress.port);
+ notifyConnectionState( acMessage );
+ notifyConnectionState( Translate("Waiting for connection...") );
+
+ // 2. ESTABLISH CONNECTION
+
+ while (1)
+ {
+ if ( m_enConnectionState != CS_Connecting )
+ { // Operation was canceled by disconnect()
+ return;
+ }
+
+ m_poSocket = SDLNet_TCP_Open( &oAddress );
+ if ( m_poSocket ) break;
+ SDL_Delay( 100 );
+ }
+
+ // CONNECTION ESTABLISHED. SEND INTRO PACKETS
+
+ notifyConnectionState( Translate("Connection established.") );
+
+ // Guarded section follows
+ {
+ Guard oGuard( m_poLock );
+
+ if ( m_enConnectionState != CS_Connecting )
+ { // Operation was canceled
+ SDLNet_TCP_Close( m_poSocket );
+ m_poSocket = NULL;
+ return;
+ }
+
+ m_poSocketSet = SDLNet_AllocSocketSet( 1 );
+ SDLNet_TCP_AddSocket( m_poSocketSet, m_poSocket ); // Check for errors?
+
+ m_iIncomingBufferSize = 0;
+ m_apoUsers.resize(1);
+ m_enConnectionState = CS_Connected;
+ }
+
+ sendNick();
+
+ return;
+}
+
+
+
+void COnlineChatBEImpl::internalDisconnect()
+{
+ Guard oGuard( m_poLock );
+ m_enConnectionState = CS_Disconnecting;
+
+ if ( m_poSocketSet )
+ {
+ SDLNet_FreeSocketSet( m_poSocketSet );
+ m_poSocketSet = NULL;
+ }
+ if ( m_poSocket )
+ {
+ SDLNet_TCP_Close( m_poSocket );
+ m_poSocket = NULL;
+ }
+
+ m_apoUsers.resize(1);
+
+ m_enConnectionState = CS_Disconnected;
+
+ notifyConnectionState( Translate( "Disconnected from MortalNet." ) );
+}
+
+
+/** Reads one message from the server and processes it. */
+void COnlineChatBEImpl::internalProcessMessage()
+{
+ if ( m_enConnectionState != CS_Connected )
+ {
+ return;
+ }
+
+ // 1. CHECK FOR STUFF TO READ
+
+ int iRetval = SDLNet_CheckSockets( m_poSocketSet, 0 );
+ if ( iRetval <= 0 )
+ {
+ SDL_Delay( 100 );
+ return;
+ }
+
+ // 2. APPEND AT MOST 1024 bytes TO THE END OF THE INCOMING BUFFER
+
+ // CHECK FOR BUFFER OVERFLOW HERE.
+ if ( m_iIncomingBufferSize >= 1024*3 )
+ {
+ m_acIncomingBuffer[m_iIncomingBufferSize] = '\n';
+ m_acIncomingBuffer[m_iIncomingBufferSize+1] = 'x';
+ m_iIncomingBufferSize += 1;
+ }
+ else
+ {
+ iRetval = SDLNet_TCP_Recv( m_poSocket, m_acIncomingBuffer + m_iIncomingBufferSize, 1024 );
+ if ( iRetval <= 0 )
+ {
+ notifyConnectionState( std::string(Translate("Connection error: ")) + SDLNet_GetError() );
+ internalDisconnect();
+ return;
+ }
+ m_iIncomingBufferSize += iRetval;
+ }
+
+
+}
+
+
+
+void COnlineChatBEImpl::threadFunction()
+{
+ while (1)
+ {
+ // Wait until connection is initiated by connect()
+ while ( m_enConnectionState == CS_Disconnected ) {
+ SDL_Delay( 100 );
+ }
+
+ // Start to connect
+ internalConnect();
+
+ while ( m_enConnectionState == CS_Connected ) {
+ internalProcessMessage();
+ }
+
+ if ( m_enConnectionState == CS_Disconnecting )
+ {
+ internalDisconnect();
+ }
+ }
+}
+
+
+void COnlineChatBEImpl::sendNick()
+{
+ sendRawData( 'N', m_sMyNick.c_str() );
+}
+
+
+void COnlineChatBEImpl::sendRawData( char a_cPrefix, const char* a_pcMessage )
+{
+ if ( m_enConnectionState == CS_Disconnected
+ || m_poSocket == NULL )
+ {
+ debug( "COnlineChatBEImpl::sendRawMessage: Cannot send %c %s: disconnected\n",
+ a_cPrefix, a_pcMessage );
+ return;
+ }
+
+ // TODO This could be more efficient, send with one SDLNet_TCP_Send
+ SDLNet_TCP_Send( m_poSocket, &a_cPrefix, 1 );
+ SDLNet_TCP_Send( m_poSocket, (void*) a_pcMessage, strlen(a_pcMessage) );
+
+ char cNL = '\n';
+ SDLNet_TCP_Send( m_poSocket, &cNL, 1 );
+}
+
+
+
+
+///////////////////////////////////////////////////////////////////////////
+// Synchronous control methods
+///////////////////////////////////////////////////////////////////////////
+
+void COnlineChatBEImpl::connect( std::string a_sNick )
+{
+ if ( m_enConnectionState != CS_Disconnected )
+ {
+ notifyConnectionState( m_enConnectionState, m_enConnectionState, "Cannot connect: already connected." );
+ return;
+ }
+
+ Guard oGuard(m_poLock);
+
+ m_sMyNick = a_sNick;
+ m_enConnectionState = CS_Connecting;
+}
+
+
+void COnlineChatBEImpl::disconnect()
+{
+ if ( m_enConnectionState == CS_Disconnected )
+ {
+ notifyConnectionState( m_enConnectionState, m_enConnectionState, "Cannot disconnect: already disconnected." );
+ return;
+ }
+
+ Guard oGuard(m_poLock);
+
+ m_enConnectionState = CS_Disconnecting;
+}
+
+
+IOnlineChatBE::ConnectionStateEnum COnlineChatBEImpl::getConnectionState() const
+{
+ return m_enConnectionState;
+}
+
+
+ // Getting/setting my connection parameters
+
+std::string COnlineChatBEImpl::getMyNick() const
+{
+ return m_sMyNick;
+}
+
+
+void COnlineChatBEImpl::setMyNick( std::string a_sNick )
+{
+ if ( m_enConnectionState == CS_Connected )
+ {
+ }
+ else
+ {
+ m_sMyNick = a_sNick;
+ }
+}
+
+
+IOnlineChatBE::ClientModeEnum COnlineChatBEImpl::getMyClientMode() const
+{
+ return m_enClientMode;
+}
+
+
+void COnlineChatBEImpl::setMyClientMode( IOnlineChatBE::ClientModeEnum a_enNewMode )
+{
+ if ( m_enClientMode == a_enNewMode )
+ {
+ return;
+ }
+
+ m_enClientMode = a_enNewMode;
+ if ( m_enConnectionState == CS_Connected )
+ {
+ // TODO send this to the server
+ }
+}
+
+
+const IOnlineChatBE::UserInfo& COnlineChatBEImpl::getMyUserInfo() const
+{
+ UserInfo* poInfo = m_apoUsers.front();
+
+ poInfo->m_sNick = m_sMyNick;
+ poInfo->m_enClientMode = m_enClientMode;
+
+ return *poInfo;
+}
+
+
+
+
+ // User control
+
+int COnlineChatBEImpl::getUserCount() const
+{
+ return m_apoUsers.size();
+}
+
+
+const IOnlineChatBE::UserInfo& COnlineChatBEImpl::getUserInfo( int a_iUserNumber ) const
+{
+ if ( a_iUserNumber <= 0
+ || a_iUserNumber >= getUserCount() )
+ {
+ return getMyUserInfo();
+ }
+ else
+ {
+ UserInfoList::const_iterator it = m_apoUsers.begin();
+ for ( int i=0; i<a_iUserNumber; ++i )
+ {
+ ++it;
+ }
+ return *(*it);
+ }
+}
+
+
+IOnlineChatBE::ClientModeEnum COnlineChatBEImpl::getClientMode() const
+{
+ return m_enClientMode;
+}
+
+
+void COnlineChatBEImpl::setClientMode( ClientModeEnum a_enNewMode )
+{
+ if ( m_enClientMode == a_enNewMode )
+ {
+ return;
+ }
+
+ m_enClientMode = a_enNewMode;
+
+ if ( m_enConnectionState == CS_Connected )
+ {
+ // TODO Send this to the server
+ }
+}
+
+
+
+
+ // Event sinks
+
+
+void COnlineChatBEImpl::addEventSink( IOnlineEventSink* a_poSink )
+{
+ m_apoSinks.push_back( a_poSink );
+}
+
+
+void COnlineChatBEImpl::removeEventSink( IOnlineEventSink* a_poSink )
+{
+ m_apoSinks.remove( a_poSink );
+}
+
+
+void COnlineChatBEImpl::removeAllEventSinks()
+{
+ m_apoSinks.clear();
+}
+
+
+void COnlineChatBEImpl::notifyEvent( const IOnlineChatBE::SChatEvent& a_roEvent )
+{
+ EventSinkList::const_iterator it;
+ for ( it = m_apoSinks.begin(); it != m_apoSinks.end(); ++it )
+ {
+ (*it)->receiveEvent( a_roEvent );
+ }
+}
+
+
+void COnlineChatBEImpl::notifyConnectionState( IOnlineChatBE::ConnectionStateEnum a_enOldState,
+ IOnlineChatBE::ConnectionStateEnum a_enNewState, const std::string& a_rsMessage )
+{
+ EventSinkList::const_iterator it;
+ for ( it = m_apoSinks.begin(); it != m_apoSinks.end(); ++it )
+ {
+ (*it)->connectionStateChange( a_enOldState, a_enNewState, a_rsMessage );
+ }
+
+ m_enNotifiedState = a_enNewState;
+}
+
+
+void COnlineChatBEImpl::notifyConnectionState( const std::string& a_rsMessage )
+{
+ notifyConnectionState( m_enNotifiedState, m_enConnectionState, a_rsMessage );
+}
+
+
+
+
+
+
+IOnlineChatBE::UserInfo::UserInfo()
+{
+ m_enClientMode = CM_Chatroom;
+}
+
+IOnlineChatBE::UserInfo::UserInfo( const UserInfo& a_roRhs )
+: m_sNick( a_roRhs.m_sNick ),
+ m_enClientMode( a_roRhs.m_enClientMode ),
+ m_sHostName( a_roRhs.m_sHostName ),
+ m_sHostAddress( a_roRhs.m_sHostAddress )
+{
+}
+
+IOnlineChatBE::UserInfo& IOnlineChatBE::UserInfo::operator=( const UserInfo& a_roRhs )
+{
+ m_sNick = a_roRhs.m_sNick;
+ m_enClientMode = a_roRhs.m_enClientMode;
+ m_sHostName = a_roRhs.m_sHostName;
+ m_sHostAddress = a_roRhs.m_sHostAddress;
+ return *this;
+}
+
diff --git a/src/OnlineChatBEImpl.h b/src/OnlineChatBEImpl.h
new file mode 100755
index 0000000..f4b7d00
--- /dev/null
+++ b/src/OnlineChatBEImpl.h
@@ -0,0 +1,98 @@
+//
+// C++ Interface: COnlineChatBEImpl
+//
+// Description:
+//
+//
+// Author: upi <upi@feel>, (C) 2004
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef CONLINECHATBEIMPL_H
+#define CONLINECHATBEIMPL_H
+
+
+#include "OnlineChatBE.h"
+#include "SDL_net.h"
+#include "SDL_thread.h"
+#include <list>
+
+/**
+Implementation of the COnlineChatBE interface
+\ingroup Network
+\author upi
+*/
+class COnlineChatBEImpl: public IOnlineChatBE
+{
+public:
+ COnlineChatBEImpl();
+
+ ~COnlineChatBEImpl();
+
+
+public:
+ // Connection
+
+ virtual void connect( std::string a_sNick );
+ virtual void disconnect();
+ virtual ConnectionStateEnum getConnectionState() const;
+
+ // Getting/setting my connection parameters
+
+ virtual std::string getMyNick() const;
+ virtual void setMyNick( std::string a_sNick );
+ virtual ClientModeEnum getMyClientMode() const;
+ virtual void setMyClientMode( ClientModeEnum a_enClientMode );
+ virtual const UserInfo& getMyUserInfo() const; ///< Same as getUserInfo(0)
+
+ // User control
+
+ virtual int getUserCount() const;
+ virtual const UserInfo& getUserInfo( int a_iUserNumber ) const;
+ virtual ClientModeEnum getClientMode() const;
+ virtual void setClientMode( ClientModeEnum a_enNewMode );
+
+ // Event sinks
+
+ virtual void addEventSink( IOnlineEventSink* a_poSink );
+ virtual void removeEventSink( IOnlineEventSink* a_poSink );
+ virtual void removeAllEventSinks();
+
+protected:
+ void notifyEvent( const IOnlineChatBE::SChatEvent& a_roEvent );
+ void notifyConnectionState( IOnlineChatBE::ConnectionStateEnum a_enOldState,
+ IOnlineChatBE::ConnectionStateEnum a_enNewState,
+ const std::string& a_rsMessage );
+ void notifyConnectionState( const std::string& a_rsMessage );
+
+ void threadFunction();
+ void internalConnect();
+ void internalDisconnect();
+ void internalProcessMessage();
+ void sendNick();
+ void sendRawData( char a_cPrefix, const char* a_pcMessage );
+
+protected:
+ // typedef
+ typedef std::list<IOnlineEventSink*> EventSinkList;
+ typedef std::list<UserInfo*> UserInfoList;
+
+ // Internal state
+ ConnectionStateEnum m_enConnectionState; // The current state of the connection to the server
+ ConnectionStateEnum m_enNotifiedState; // The last notified connection state
+ ClientModeEnum m_enClientMode; // The current state of the client (e.g. "away")
+ std::string m_sMyNick; // The last received nick from the server
+ EventSinkList m_apoSinks; // Receivers of events
+ UserInfoList m_apoUsers; // User list from the server
+
+ // Connection to the server
+ TCPsocket m_poSocket; // The TCP/IP network socket.
+ SDLNet_SocketSet m_poSocketSet; // SDLNet construct for watching the socket.
+ char m_acIncomingBuffer[4096]; ///< Received data goes here.
+ int m_iIncomingBufferSize; ///< How much of the buffer is filled?
+
+ SDL_mutex* m_poLock;
+};
+
+#endif

File Metadata

Mime Type
text/x-diff
Expires
Mon, Jun 15, 11:28 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
72048
Default Alt Text
(19 KB)

Event Timeline