Getting Started with ADSP-BF537 EZ-KIT Lite
2-11
Running a TCP/IP application on an ADSP-BF537 EZ-KIT Lite
else
{
break;
}
}
close ( m_iSocket );
}
Listing 2-2. Caesar_Cipher_ThreadType()
Implementation
Caesar_Cipher_ThreadType::Caesar_Cipher_ThreadType(VDK::Thread::
ThreadCreationBlock &tcb)
: VDK::Thread(tcb)
{
m_iSocket = (int) tcb.user_data_ptr;
}
Listing 2-3. VDK::Thread Implementation
class Caesar_Cipher_ThreadType : public VDK::Thread
{
public:
Caesar_Cipher_ThreadType(VDK::Thread::ThreadCreationBlock&);
virtual ~Caesar_Cipher_ThreadType();
virtual void Run();
virtual int ErrorHandler();
static VDK::Thread* Create(VDK::Thread::ThreadCreationBlock&);
/* The following declarations are specific to this example */
protected:
int m_iSocket;
char m_vInBuf[16];
char m_vOutBuf[16*2];
www.BDTIC.com/ADI