Doubts about sockets in vc++
-
please any one tell can we connect can we connect win32 socket in client side with CSocket class in server side????:confused: if u give answer with sample code means i will be more happy..:cool: thanks in advance....:rose:
thangvel wrote:
please any one tell can we connect can we connect win32 socket in client side with CSocket class in server side?
Yes, at the network level there is only one type of socket, and a CSocket is merely a C++ wrapper class for the basic socket mechanism.
thangvel wrote:
if u give answer with sample code means i will be more happy
Unfortunately, you are going to be less happy. If you want source code you need to search the articles for samples; there are many.
MVP 2010 - are they mad?
-
please any one tell can we connect can we connect win32 socket in client side with CSocket class in server side????:confused: if u give answer with sample code means i will be more happy..:cool: thanks in advance....:rose:
There is no particular requirement on the
Win32
socket connection, if in the other side there is aCSocket
. So just have a look at the documentation [^]. :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
please any one tell can we connect can we connect win32 socket in client side with CSocket class in server side????:confused: if u give answer with sample code means i will be more happy..:cool: thanks in advance....:rose:
-
please any one tell can we connect can we connect win32 socket in client side with CSocket class in server side????:confused: if u give answer with sample code means i will be more happy..:cool: thanks in advance....:rose:
thangvel wrote:
can we connect win32 socket in client side with CSocket class in server side
Yes you we can.
thangvel wrote:
if u give answer with sample code means i will be more happy
I would not use the class
CSocket
instead useCAsyncSocket
or something else. Have a look at Beej's guide to networking programming[^] and Winsock Programmer's FAQ[^], there are client/server examples in section 6. You can download, modify it and play with it. Hope it helps! :) /MWebchat in Europe :java: (only 4K)