Search the web
Sign In
New User? Sign Up
wxMS_developers · Development with wxWidgets on MSWindows
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Issues with POP3/wxSocketClient   Message List  
Reply | Forward Message #658 of 693 |
Re: {Disarmed} Re: [wxMS_developers] Issues with POP3/wxSocketClient

Hi, Andy!
 
Just curious... why VC8? Why not VC9 on Vista 64?
 
thx,
Dave S.
----- Original Message -----
Sent: Sunday, December 21, 2008 11:38 AM
Subject: RE: {Disarmed} Re: [wxMS_developers] Issues with POP3/wxSocketClient

Hi,

 

I posted some code in a separate message a few minutes ago, I just wanted to point out that the code runs error free when compiled in Release mode, and works as it should when saving the memory block to a file (and viewing it in a text editor). So the problems only appear in Debug mode on VC8/Vista 64. I can live with that I guess hehe.

 

--

Kind Regards,

 

Andy 'Fish-Guy' Kellett <andy@...>

http://www.f1-software.com

 

From: wxMS_developers@yahoogroups.com [mailto:wxMS_developers@yahoogroups.com] On Behalf Of Dave Silvia
Sent: Saturday, December 20, 2008 10:45 PM
To: wxMS_developers@yahoogroups.com
Subject: {Disarmed} Re: [wxMS_developers] Issues with POP3/wxSocketClient

 

Hi, Andy!

 

It's a little difficult to discuss the problem when the only information available is that you're using wxSocketClient. The problem may be further up the line. With only this one piece of information, one must assume that everything before the call to wxSocketClient methods/functions to retrieve the messages is performing correctly and that everything that was needed to be done before the wxSocketClient transactions was done!;)

 

It's much, much easier to talk about problems and issues if you attach your project (or a facsimile) to a posting you make from your email client (Yahoo! Groups does not do attachments!:-< ).

 

If you're using DialogBlocks, it's even easier to "share" as all one must needs do is attach the .pjd file (DialogBlocks project file). This will allow the receiver to build and run on their own system quite easily.

 

Any attachments should be in archive format (zip or other) to reduce size (.pjd's are quite large, but very compressible!;) and to make it more likely that the receiver's email client/antispam won't prevent its delivery.

 

The only thing I can do, from the information available here, is make a "swag" at a possibility. It appears that an "undocumented procedure" in wxSocketBase has to be performed first. I put it in quotes because it actually is documented, but only "before" the fact. That is, most wxWidgets "Base" classes are not intended to be used, only derived from. Hence, a developer (like me!;) doesn't often look at base classes in wxWidgets classes. The assumption being that the derived wxWidgets class is/has taken care of any parent class necessities.

 

In looking at the wxSocketBase documentation I see a blurb:

 

>>>>> 

wxSocketBase is the base class for all socket-related objects, and it defines all basic IO functionality.

Note: (Workaround for implementation limitation for wxWidgets up to 2.5.x) If you want to use sockets or derived classes such as wxFTP in a secondary thread, call wxSocketBase::Initialize() (undocumented) from the main thread before creating any sockets - in wxApp::OnInit for example.

 

<<<<< 

 

Now, it does say this is for wxWidgets up to 2.5.x, but it's the only "swag" I've got right now!:-( If it doesn't help, you might like to consider archiving an example and attaching it to an email client generated post.

 

HTH:

 
thx,
Dave S.
 
From a Braille bumper sticker...
 
If you can read this, you are too close!
 
 
wxMS_developers - Development with wxWidgets on MSWindows
http://tech.groups.yahoo.com/group/wxMS_developers/
 
wxWidgets Code Exchange
http://www.wxCodex.net/

> -- On Sat, 20 Dec 2008 21:20:29 -0500 Andy Kellett wrote --

> Hi,

> 

> I'm trying to write a really simple POP3 client using wxSocketClient which should connect to

> a POP3 account, and download all messages. It is to be part of my order handling processing

> system and I am having some odd issues that I can't seem to solve.

> 

> I am able to handle everything up to retrieving the actual message. I have tried a number of

> different methods to try and get this to work and so far I have not found anything that works

> consistently.

> 

> The first method was one I saw on a wxWidgets forum, involving a large string buffer. Call

> the Read() command and add the returned string to the main buffer string, parse the newline

> and remove the entire line to shorten the string, then repeat till the end of the message

> (single line with '.'). This only works a little bit and the socket seems to stop reading

> after a couple of messages, mid message, for no apparent reason.

> 

> Another idea I had was to allocate a block of memory big enough to hold the message, and call

> a Read() command with this buffer sixe, thinking the message would just read into memory

> where I can process it further. The problem here is that every so often, it doesn't work. It

> works on about 90% of the messages, but doesn't read in the entire thing, the LIST command

> for the next message still recovers parts of the previous message. The documentation for

> Read() doesn't state if there is a limit on the amount of data it transfers at one time, or

> if there is a way to wait for the buffer to contain a certain amount of data before reading.

> 

> I guess my question, is does someone have any POP3 retreival code anywhere, or could explain

> a process on how to make this work? I have found samples on the net for everything except

> POP3 hehe =)  Any help is greatly appreciated =) Thanks in advance.

> 

> --

> Kind Regards,

> 

> Andy 'Fish-Guy' Kellett <andy@...>

 




avast! Antivirus: Inbound message clean.

Virus Database (VPS): 081221-0, 12/21/2008
Tested on: 12/21/2008 6:04:07 PM
avast! - copyright (c) 1988-2008 ALWIL Software.





avast! Antivirus: Outbound message clean.

Virus Database (VPS): 081225-0, 12/25/2008
Tested on: 12/25/2008 4:38:10 PM
avast! - copyright (c) 1988-2008 ALWIL Software.




Thu Dec 25, 2008 10:38 pm

db_vs_dave
Offline Offline
Send Email Send Email

Forward
Message #658 of 693 |
Expand Messages Author Sort by Date

Hi, I'm trying to write a really simple POP3 client using wxSocketClient which should connect to a POP3 account, and download all messages. It is to be part of...
Andy Kellett
f1software2000
Online Now Send Email
Dec 21, 2008
2:20 am

Hi, Andy! It's a little difficult to discuss the problem when the only information available is that you're using wxSocketClient. The problem may be further up...
Dave Silvia
db_vs_dave
Offline Send Email
Dec 21, 2008
3:45 am

Hi, I posted some code in a separate message a few minutes ago, I just wanted to point out that the code runs error free when compiled in Release mode, and ...
Andy Kellett
f1software2000
Online Now Send Email
Dec 21, 2008
5:37 pm

... 64-bit problems more often than not, are a case where size_t should have been used rather than int or unsigned int/long etc....
Bob Paddock
ka8bmt
Offline Send Email
Dec 22, 2008
1:49 pm

Hi, Andy! Just curious... why VC8? Why not VC9 on Vista 64? thx, Dave S. ... From: Andy Kellett To: wxMS_developers@yahoogroups.com Sent: Sunday, December 21,...
Dave S.
db_vs_dave
Offline Send Email
Dec 25, 2008
10:38 pm

Hi, Dave, thanks for your feedback. I am aware of the Initialize() command you pointed out (read over those docs lots of times!) and do use it to make sure the...
Andy Kellett
f1software2000
Online Now Send Email
Dec 22, 2008
12:14 am

... Take a look at http://mailfilter.sf.net 's code. A lot of problems are actually on the server end, especially if you are trying to deal with unknown...
Bob Paddock
ka8bmt
Offline Send Email
Dec 22, 2008
1:54 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help