Originally posted by: Arlen Albert
Hi :)
What Am I Doing Wrong?
Situation: When Some Client Sends Messgaes In A Very Short Time (About In 100 Milliseconds Between Next One) Then The NDKServer Thread Hands As If It Queued Too Much Data To Process And There Is No Time To Do That. When That Client Disconnects Then NDKServer Comes Alive :) Both Sides Use WindowsXP And Both The Server And The Client Modules Are Compiled By Visual Studio .NET C++. When I Was Using Visual Studio C++ v.6 For A Compilation There Were No Such Problems At All.
I'm Lost. Any Explainations?
Best Regards.
Arlen.
Reply
Originally posted by: Tiny Young
;P
ReplyOriginally posted by: Iftikhar Aziz
Helpful.
Originally posted by: Tommy Wong
First of all, thanks for your effort to develop this project.
I tried to use this dll under Access XP with out success.
Access report "Cannot not find DLL Entry point OpenConnection in NDK.dll" (I tried to call the OpenConnection function)
I think that is because the C++ naming problem. How can I fix that and regenerate the dll file?
I put "OpenConnection" under the export header in NDK.def file and the system crashed.
Looking forward to your reply
Tom
ReplyOriginally posted by: Quantum Warrior
If you have a lot of connections and disconnections made the user id is going to get very high very quickly. You could re-use the id's by getting rid of m_lNextId from CNDKUserManager and changing the AddUser function thus:
long CNDKUserManager::AddUser(CNDKServerSocket* pServerSocket)
POSITION pos = m_users.GetHeadPosition();
m_users.AddTail(CNDKUser(lNextId, pServerSocket));
This code will reuse expired user id's.
Also, something which I have added for my personal apps is time and date of connection logging.
Just a suggestion, but keep churning out new versions and I'll keep using them. Nice one!!!
I think this NDK is great, it saves me a lot of time and effort. I use it for most of me TCP/IP stuff. Could I suggest one improvement for your next version.
{
long lNextId = 0;
while( pos )
{
if( m_users.GetNext( pos ).GetId() == lNextId )
{
lNextId++;
pos = m_users.GetHeadPosition();
}
}
return lNextId;
}
Originally posted by: Eko Sulistyo A
Thanks for your code. Do you have version that using CAsyncSocket instead.
Thank You.
Originally posted by: Mike Leung
hi,
i tried using ndk 2.0 in my application, that is not a MFC app, it is just a regular win32 app, but when i added the ndk, i changed the settings to that i use MFC as a shared dll..
but now when I compile i get this error:
d:\msdev\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
even though i do not include windows.h anywhere in my code...
any ideas??
Reply
Originally posted by: Heinrich Retzlaw
hello,
sorry, I learned C and C++ on unix. And there I learned, that every programm starts with
int main(...)
So when I programm in windows every programm has a main, so I know, where the programm starts. But I can not found a main in the NDK-Demo. Can somebody give me a hint? That would be very nice. Thank you.
Best regards
Heinrich
Originally posted by: Ulle
Wonderful implementation, but one question left: Is it possible to get your classes working under a console application ? What have I to do reg. the message-handling ?
Reply
Originally posted by: Balasubramanian
Bala...
Really Very nice code, It will use for client server architecure programe.