Socket Programming using threads
-
Scenario :- I want to connect to multiple servers from a single client at a time and collect some information. Is it possible to do this using CAsyncSocket in a single thread for each server? When is CAsynSocket used instead of CSocket ? Thanks in Advance, Ajoy. U Live And Let Others Live :)
-
Scenario :- I want to connect to multiple servers from a single client at a time and collect some information. Is it possible to do this using CAsyncSocket in a single thread for each server? When is CAsynSocket used instead of CSocket ? Thanks in Advance, Ajoy. U Live And Let Others Live :)
Hi, Be carefull with multithreading, CLOSING, I've experinced the pain.PLAN PROPERLY. Sujan
-
Scenario :- I want to connect to multiple servers from a single client at a time and collect some information. Is it possible to do this using CAsyncSocket in a single thread for each server? When is CAsynSocket used instead of CSocket ? Thanks in Advance, Ajoy. U Live And Let Others Live :)
Hello, MSDN says the following about CSocket and CASyncSocket: "You should probably consider using CAsyncSocket if you want Windows Sockets' ease of dealing with multiple network protocols in an MFC application but do not want to sacrifice flexibility. You might also feel that you can get better efficiency by programming the communications more directly yourself than you could using the more general alternative model of class CSocket." So CSocket is a more easy to use class at the cost of some overhead. If you don't need high speed connections, multi network protocols, I'd stick with CSocket. Hope this helps :-D Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
-
Hello, MSDN says the following about CSocket and CASyncSocket: "You should probably consider using CAsyncSocket if you want Windows Sockets' ease of dealing with multiple network protocols in an MFC application but do not want to sacrifice flexibility. You might also feel that you can get better efficiency by programming the communications more directly yourself than you could using the more general alternative model of class CSocket." So CSocket is a more easy to use class at the cost of some overhead. If you don't need high speed connections, multi network protocols, I'd stick with CSocket. Hope this helps :-D Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
I have heard that there are problems with CSocket. Check out this article. http://tangentsoft.net/wskfaq/articles/csocket.html[^]
-
I have heard that there are problems with CSocket. Check out this article. http://tangentsoft.net/wskfaq/articles/csocket.html[^]
I didn't knew that.. Als an alternative, you can use a Socket class found here on codeproject. There are many here, so it should be easy to find one. Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.