Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Wed, 13 Aug 2008 11:21:59 -0500,    group: microsoft.public.inetsdk.programming.wininet        back       


WinSock and CSocket issues   
Hi,

I'm trying to write an FTP class derived from CSocket. I've read a few stories 
about how bad CSocket is, but I decided to try it anyway. One of the main 
reasons for doing this is to have access to the OnSend and OnReceive 
notifications...which apparently do not work.

I'm taking baby steps to make sure I have all of the ground work figured out and 
I can communicate on the socket. I am not new to socket programming, but I'm 
having some issues.

First, I have successfully created a class derived from CSocket. The "host" 
application has created the object. Inside the ConnectToServer() function, I 
create the socket, connect to the server, and get the welcome message from the 
server. All of this seems to be working without flaw.

However, when I send the USER command, the Receive() function hangs. I've tried 
two different methods: reading a block, and reading one byte at a time. Both 
hang during the second SEND/RECEIVE. I've tried closing the socket after a 
successful read, but obviously that's not going to work.

I'm doing this on Windows CE (Pocket PC 2003 and higher) in eVC4. These are 
requirements. I can't change them.

If anyone has any suggestions on what's causing the problem, or if anyone has a 
class that I could use (or even direction to some good information), I would 
really appreciate it. Anything that I receive will be put into a commercial product.

I can send code if anyone needs to see it. It's fairly straightforward.

Thanks,
Kevin
date: Wed, 13 Aug 2008 11:21:59 -0500   author:   Kevin

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us