[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 420
  • Last Modified:

Is CCeSocket no longer available in VS2005

I am converting my project from eVC++4 to VS2005.  My comms code is all based on the CCeSocket class but it no longer compiles.  Is this no longer avaliable?

What can I use instead?
0
Wanting2LearnMan
Asked:
Wanting2LearnMan
  • 4
  • 3
5 Solutions
 
Wanting2LearnManAuthor Commented:
I have replaced the CCeSocket with CAsyncSocket and it now builds fine.  Can I make this replacement so easily?  Will I have any problems when I try to use it?
0
 
alexey_gusevCommented:
you can compare old and new code for the sockets in MFC. CSocket class will do if all you need is synchronous calls
0
 
itsmeandnobodyelseCommented:
>>>> CSocket class will do if all you need is synchronous calls

The docs say that CCeSocket is for asynchronous calls. Hence the substitute is CAsyncSocket.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Wanting2LearnManAuthor Commented:
I have tried using CAsyncSocket but it does not work!.  CSocket  works but I dont want synchronous calls.  

Can you think of why CAsyncSocket does not work?  It just returns error right away.
0
 
alexey_gusevCommented:
what is the error?
0
 
Wanting2LearnManAuthor Commented:
The error is WSAEWOULDBLOCK.

Is seems funny because when I put a debug message in my servers OnAccept function it seems to try to connect because the OnAccept function is called.

The error message comes up at the same time on the client side and I canot connect and communicate with the server.

Any ideas?
0
 
alexey_gusevCommented:
0
 
alexey_gusevCommented:
in general, you might have a look at http://www.codeproject.com/KB/mobile/CCESocket.aspx
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now