|
This program is very good and it's work well in my project. But I found that when I use the program to transfer bulk data, the receiver may lost some data frame.
I checked the source code carefully, and found the bug code below:
static int global_count = 0;
void CClientSocket::ReceiveCom(CComData* pComData)
{
ASSERT(pComData);
try {
do {
pComData->Serialize(*m_pArchiveIn);
global_count++;
}
while(!m_pArchiveIn->IsBufferEmpty());
}
catch(CFileException* e) {
e->Delete();
m_pArchiveIn->Abort();
}
}
The Function parameter pComData is used to save and serialize the received data, but if there is more than one data frame received, the pComData can only save the most recently data frame.
and the old data is overwrite by the most recently data frame. This kind bug is also exist in function CClientSocket::ProcessServerCom().
I make a solution to this bug, but my solution code is too ugly. Anyone can make its own solution, it is not too hard.
Sorry for my poor english.
|
|
|
|
|
Nice code.
It's just what i'm lookin' for.
Thx
|
|
|
|
|
upon closing the server I keep on getting “an attempt was made to access an unnamed file past its end” error message box
|
|
|
|
|
I tested this really cool chat system on two computers, one computer is running as a internet server (attached to the internet with non-local ip) and a second local computer (both connected via LAN). The ChatServer runs on the internet server with an ip like 84.144.xx.xx ... (dynamic ip, but thats not the problem, it was conbstant over the whole test)
Both clients are connected to ChatServer via the internet ip (i typed 84.144.xx.xx into the control of the Chat client& server), although it apperas, that one client gets its connection via 192.168.0.xx² and not via internet
Now to the problem: while the client connected via internet ip is running quite well, the client connected via the LAN ip (192.168.0.104) loses communication after 5 to 9 messages (reproducible). When i reconnect the client, communication works again but seems to decrease (hang up after 3-6 messages) and so on.
Has anyone had the same problems?
²) in detail: strangely, the second computer is reported by the chat server as connected to ip 192.168.0.104, although, it should go via internet ...(maybe some DNS problem/optimisation of windows?... dont know)
Remarks: I did some minor code changes but they really should not affect communications
-- modified at 10:06 Monday 7th August, 2006
|
|
|
|
|
Having the same issue , did you find a solution?
|
|
|
|
|
How are u dear!
Are u receiving this message?;P
|
|
|
|
|
I find this application brilliant
single encounter an error
when some of the clients loses communication with the server
pej. if it turns off the PC
this client continues appearing active in the list of clients of the server...
that is not a lot of problem, but when you try to send it a message, the server gives an error and it closes
Would there be form of verifying if a client this really connected one before
sending it the message?
CPtrList* pClientstList = GetClientsList();
Thanks
Nelson
|
|
|
|
|
Appears incorrectly at startup
Corrects once resized ...
Have looked thru the code and changed a few things ...but to no avail ... is this a TVisualframework issue?
Richard
|
|
|
|
|
|
Apply theses changes
ChatWithUSDI_src\Commun\VisualFx.cpp
splitter->IsChildPane(this,row,col); //Line 884
to
splitter->IsChildPane(this,&row,&col);
ChatWithUSDI_src\Commun\MainTray.cpp
void CMainTray::OnTrayNotify(WPARAM wParam, LPARAM lParam) //Line 195
to
LRESULT CMainTray::OnTrayNotify(WPARAM wParam, LPARAM lParam)
ChatWithUSDI_src\Commun\MainTray.h
afx_msg void OnTrayNotify(WPARAM wParam, LPARAM lParam); //Line 75
to
afx_msg LRESULT OnTrayNotify(WPARAM wParam, LPARAM lParam);
ChatWithUSDI_src\Commun\DialogBarEx.cpp
void CDialogBarEx::InitDialogBarHandler(WORD wParam, DWORD lParam) //Line 49
to
LRESULT CDialogBarEx::InitDialogBarHandler(WPARAM wParam, LPARAM lParam)
ChatWithUSDI_src\Commun\DialogBarEx.h
afx_msg void InitDialogBarHandler(WORD wParam, DWORD lParam); //Line 43
to
afx_msg LRESULT InitDialogBarHandler(WPARAM wParam , LPARAM lParam);
ChatWithUSDI_src\Chat Client\CtrlBar\sizecbar.cpp
if (!CMiniFrameWnd::CreateEx(dwExStyle, NULL, &afxChNil, dwStyle, rectDefault, pParent)) //Line 1253-1253
to
if (!CMiniFrameWnd::CreateEx(dwExStyle, NULL, NULL, dwStyle, rectDefault, pParent))
And finally remove all post processing call to upx and enjoy!
->L'enfer est pavé de bonnes intentions! :-S
->The road to hell is paved with good intentions! :-S
|
|
|
|
|
Great Project,
What do you mean by - And finally remove all post processing call to upx?
Thanks,
BP
|
|
|
|
|
The PE header under VC++2003 as changed and this is why you need to turn off upx if you want that release work.
L'enfer est pavé de bonnes intentions! ![Rose | [Rose]](https://www.codeproject.com/script/Forums/Images/rose.gif) The road to hell is paved with good intentions!
|
|
|
|
|
Thanks, how do I turn off upx...I don't even know what it is...forgive me I'm new to programming.
Thanks again,
BP
|
|
|
|
|
|
|
i'm a beginner about network programming, i found this project is very good for me.
But when i read source code, it does not has complet comment and very hard for understand, so can you add more comment or tell more about function of individual class ?
p/s:i'm not good in English, sorry all.
|
|
|
|
|
may i know how to install it and setting on the different computer in network to make it run successful ?? thanks ya

|
|
|
|
|
good work, I'm lookin' for example like this.
Thx
Greetz
Al Smith
|
|
|
|
|
How about doing a Java Client
|
|
|
|
|
Thanks, your program is great! I was supposed to develop this but after i found this, my job got easier.
I found a bug but its easy to solve. Minimize the application
so that the status icon in the taskbar will show up. Then right
click on it then click outside the menu. After doing this, the
menu should hide but it didn't. (As if a user cancels menu selection).
To solve it, i changed the code like this on the maintray.cpp
file:
void CMainTray::OnTrayRButtonDown(CPoint pt)
{
SetForegroundWindow(); // I added this line
m_mnuTrayMenu.GetSubMenu(0)->TrackPopupMenu(TPM_BOTTOMALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON,pt.x,pt.y,this);
PostMessage(WM_NULL, 0, 0); // I added this line
m_mnuTrayMenu.GetSubMenu(0)->SetDefaultItem(m_nDefaultMenuItem,TRUE);
}
MSDN "Menus for Notification Icons Don't Work Correctly"
Andrew Mosqueda
|
|
|
|
|
Excellent job !
But I had a question ,it is how I can send bmp file to client!
|
|
|
|
|
|
Good design and clean work. Easy to understand and use. Every item is put on the right place.

|
|
|
|
|
Is there any source code for chat in ASP
|
|
|
|
|
Another not so fancy Chat system is at
http://www.codeproject.com/useritems/BarrysChatSystem.asp
|
|
|
|