Hi,
First of all I would like to thank for the wonderful piece of library. I was looking for a library of this sort for a long time.

I am working on creating a POP3 server. For this I had taken the EchoServer sample provided and modified it according to my need. But when i run this code i am unable to get the Read notification at all.

Further I noticed that even when I run the EchoServer example the first character is never reproduced. Only the next characters are echoed back. I would greatly appreciate if anybody could help in resolving this issue.

using Poco::Net::SocketReactor;
using Poco::Net::SocketAcceptor;
using Poco::Net::ReadableNotification;
using Poco::Net::ShutdownNotification;
using Poco::Net::WritableNotification;
using Poco::Net::ErrorNotification;
using Poco::Net::TimeoutNotification;
using Poco::Net::ServerSocket;
using Poco::Net::StreamSocket;
using Poco::NObserver;
using Poco::AutoPtr;
using Poco::Thread;
using Poco::Timespan;
using Poco::Util::ServerApplication;
using Poco::Util::Application;
using Poco::Util::Option;
using Poco::Util::OptionSet;
using Poco::Util::HelpFormatter;
using Poco::Net::DialogSocket;
using Poco::Net::SocketAddress;
using Poco::StringTokenizer;

// run the reactor in its own thread so that we can wait for
// a termination request
Thread thread;
thread.start(reactor);
this->logger().information("POP Server Ready");
// wait for CTRL-C or kill
waitForTerminationRequest();
// Stop the SocketReactor
reactor.stop();
thread.join();
}
return Application::EXIT_OK;
}

Any help please. I am desperate for help on this topic. Is my approach to this problem a correct one.

Regards,

Srinivasan.B

> Hi,
> First of all I would like to thank for the wonderful piece of library. I was looking for a library of this sort for a long time.
>
> I am working on creating a POP3 server. For this I had taken the EchoServer sample provided and modified it according to my need. But when i run this code i am unable to get the Read notification at all.
>
> Further I noticed that even when I run the EchoServer example the first character is never reproduced. Only the next characters are echoed back. I would greatly appreciate if anybody could help in resolving this issue.
>
> Regards,
> Srinivasan.B
>

> I am working on creating a POP3 server. For this I had taken the EchoServer sample provided and modified it according to my need. But when i run this code i am unable to get the Read notification at all.

I can not reproduce your problem. The first character I type into telnet client ends up in the breakpoint in popServiceHandler::onReadable().

Bear in mind that DialogSocket operates on lines terminated by CR-LF.

> Further I noticed that even when I run the EchoServer example the first character is never reproduced. Only the next characters are echoed back. I would greatly appreciate if anybody could help in resolving this issue.

I could not reproduce this either. The very first character typed in telnet client ends up in the onReadable(). For whatever reason, some telnet clients (e.g. windows) do not display the first character typed on the client side, which may have mislead you.

So, I don't see a problem with your code or the sample. Also, in the future when posting, please try to keep your code concise and to the point. It helps to get the answer sooner.

Thanks for your effort in helping me resolve this. Now I am able to get the ReadNotification when I do it from the telnet window. But still if I try to connect it from Thunderbird or any other POP3Client (I have a code in C#) I am unable to get into the OnReadable method. Thunderbird / Pop3 client just hangs.

Further even when I do it with a telnet I am unable to see just the first command I type in the window. Once I receive the message back through the SendMessge call then onwards I am able to see the commands I type on the telnet window. This is just I want to show in the screenshot.

I hope that you would be able to reproduce this issue with the thunderbird mail client.

> I hope that you would be able to reproduce this issue with the thunderbird mail client.

I am sorry, but I don't think I'll be able to find time in order to provide further help for your problem, at least not in the near future. Maybe someone else may jump in here and help. If this is a commercial project and you need immediate answer, you may want to get some paid help (Applied Informatics offers support contracts for POCO).