|
This is a great example but some comments in the code would make it easier to follow . Also, whenever I close the server I get the following pop-up error:
Unhandled exception at 0x004c7ac0 in chat_server.exe: 0xC0000005: Access violation reading location 0x00000000
I then have to manually stop the debugger. Sorry if this is a simple question (I'll admit that I'm a newbie) but can anyone explain why this might happen? I'm running Visual Studio 2008.
Cheers,
Ad
|
|
|
|
|
It fulfilled my requirements what i had been looking for a long time..
|
|
|
|
|
I have to implement two type of chatting:
-Multicasting(client-server chatting):once connected the server recive massege from any client and transmit to all client.The client client theen display massege at console.
accept a chat login namem,maintain chat prompt
please provide me with code at akawatia@yahoo.co.in
|
|
|
|
|
I have to implement two type of chatting:
-Multicasting(client-server chatting):once connected the server recive massege from any client and transmit to all client.The client client theen display massege at console.
-Client-Client chatting(do not transmit conversation to other client.
accept a chat login namem,maintain chat prompt
conversation must be stored in shared memory segment.there will be a scrubbing daemon(forked)that write the compleated segment into a file
plz mail me the source code at erricool@gmail.com or harsh_amity@in.com
|
|
|
|
|
hello sir,
My project is on chat application so i have made my application using java. i have used socket programing concept n rmi for authentication... when i try to connect to my server its gives me rmi remote exception error.
so can u please guide me through d process of connecting to server n recover this error..
Thanks
mehul makwana
|
|
|
|
|
ur not giving correct explanation
|
|
|
|
|
i found this article really helpful..plz keep writing more such helpful tutorials
|
|
|
|
|
this is shakher from Gangtok, i need to make a client server chat system using socket. each client must be able to communicate with all other client and server too individually and simultanously without interference. can u please send me the source code for this application.
Thankyou
my contact
sumsher7@yahoo.co.in
|
|
|
|
|
I have to implement two type of chatting:
-Multicasting(client-server chatting):once connected the server recive massege from any client and transmit to all client.The client client theen display massege at console.
-Client-Client chatting(do not transmit conversation to other client.
accept a chat login namem,maintain chat prompt
conversation must be stored in shared memory segment.there will be a scrubbing daemon(forked)that write the compleated segment into a file
please provide me with code at pol_avi@yahoo.com
|
|
|
|
|
Hi!
I want the source code for implementing the chat server/client using socket theory.Actually,I have to submit it in my collage after 2 days.I am trying to implement it but not getting success.Please help me!!!!!!!!
You can also contact me on my id if you want to help me.Its richa.cseit@gmail.com
richa
|
|
|
|
|
i also want to implement tcp/ip client server chatting application ?
if u got any kind of assistant then please help me?
thankyou!!
|
|
|
|
|
Hi !!
I want to develop a chat client using CAsyncSocket class in MFC which should be dialog based application ....
What i got on net is Win32 application .
Please help .
Thank You.
BOBO
|
|
|
|
|
how to send string as wchar_t ?
thanks.
Live and Learn!!!
|
|
|
|
|
Hi !
Thanks your project . But when i start exe va press Enter (>3 times).
Alert "Memory can not read"?
?????????????????????
How i can fix?
Blackmask.
XXX
|
|
|
|
|
Which one? chat client / server?
Regards,
Boby
|
|
|
|
|
We tested the application under Windows 2000 and Windows XP.
We need to detect a cable break.
Under Windows 2000 - select() returns with readfds signaled after some seconds.
The following recv() returns 0, e.g. connection lost is recognised.
BUT: Under Windows XP nothing happens! No signal was send by select().
Why the application shows different behaviour in Win2k / winXP?
How to detect cable break under WinXP?
|
|
|
|
|
glad to view this article.i have a little idea.when a client sends message to the server, can u define a message format?for example,char[4096],the first 256bytes used for the nickname,when server send these back to all clients,them print the nickname before(-->),so the server donnot need to maintain a database for the nickname,and the clinet can change the nickname anytime he/she wants.
|
|
|
|
|
thats a nice idea.
Regards,
Boby
|
|
|
|
|
hello, i´ve a problem with the project
the problem is that i don´t know how to integrate the project in my program in a "transparent" way, so i can use the functions provided.
i really need event driven messaging for my program, and this seems the only class out there that can do that (shame you can´t get the com events as easy as in the old times).
Could something give me more detailed instructions on how to use this classes in my program(really more detailed), or where to find an easier one? (spent countless hours in google, and found just this event driven class)
By the way, i´m using visual studio 6.0 and MFC classes
Thanks for the help
Dimas
|
|
|
|
|
I don't know if i'm understanding you correctly... but if you want to make an application that is event driven just use the tools provided by win32 library. I'd suggest you learn about semaphores and signals then use the following:
HANDLE hMyEvent = CreateEvent(NULL, false, false, NULL); // non-signaled state with automatic reset
then whenever you want to wait for an event just do the following:
DWORD dwReturnValue = WaitForSingleEvent(hMyEvent, INFINITE); // or any time in ms
the above will sit and wait until hMyEvent is signaled. To signal it simply do the following:
SetEvent(hMyEvent);
Once the event is signaled a single thread will proceed and hMyEvent will be reset (to the unsignaled state).
I don't know if this is what you're asking, but hope it helps. Sorry it's so rushed. I'm on my way out but I thought I'd just quickly respond to this question off the top of my head because you sound like you're making your life difficult for no reason. Cheers.
|
|
|
|
|
I read your article Interprocess Communication using Sockets.
in codeproject.com. that's great!
one point i do not really understand. in code, server has created two separate sockets.
Why you need separate sockets?
would you please give me a hand or hint ?
thank you very much!!
|
|
|
|
|
In server side, one socket listens to calls from outside and one each for each client to receive data.
In client side, one for sending and one for receiving data.
Regards,
Boby
|
|
|
|
|
hi,
i have to develop one interprocess communication b/w two processes running in different PCs
Could please suggest me some nice site to start from very basic till good coding...
If possible give me one example of IPC program.
Regards,
Sunitha
|
|
|
|
|
Book Linux Programming Unleashed - SAMS covers basic details of Interprocess communications.
Eventhough the book is dealing with linux environment, the concepts are the same in windows also.
Regards,
Boby
|
|
|
|
|
To create communication between 2 networked computers, you will either need to setup a Client/Server model (like this demo program) or a Peer-to-Peer model. The Client/Server model establishes one program as the "Server" to which all other "Clients" connect to and receive directions from the server. The Peer-to-Peer model is a loosely connected group of network aware programs, none of which control the interation between each other.
Another important factor to consider is which protocol to implement: TCP/IP (used by this demo) or UDP/IP. TCP is a "connection oriented" socket communications, in which data is buffered, sent in sequential order, with guaranteed delivery. UDP is "connection-less" in that it packages up data and sends it off without caring if it is received by that addressee or not, nor in what order the packets are received. However, UDP strengths are reduced overhead (28 bytes to TCP's 40 bytes) and generally a higher throughput rate of message traffic.
TCP or UDP brings you up to Layer 4 on the OSI model. To establish your own communications between your 2 programs, you will essentially be creating your own messaging protocol which is contained within TCP segment or UDP datagram. So on one end you will create your message and send it within a WinSock call <send((char*)pmessage, msgsize)="">, if sent by TCP. The receiving program will get the message in memory buffer <recv((char*)pbuffer, &bytesreceived)="">, and then need to process the message contained in the buffer.
Therefore, many considerations are involved based on the type of communication requirements your program has:
1. Network I/O architecture (Client/Server vs. Peer-to-Peer)
2. Underlying protocols used (TCP vs. UDP - 2 most common)
I have a couple of books at the office I use for reference. One is "Network Programming for Microsoft Windows" by Microsoft Press. I also use MSDN's site pretty heavily for specific details about various function calls, but not the best read for learning.
Once you are past the preliminaries, then the real fun begins! You will get to learn about Blocking Mode vs. all the Non-Blocking Mode communications... but that is another story, for another time.
Best of luck,
Tobin Kaneshiro
|
|
|
|