Which mechanism is better?

  • Thread starter Thread starter Mihajlo Cvetanovic
  • Start date Start date
M

Mihajlo Cvetanovic

Hi,

I have to create a dll with communication functionality.

The first idea was to implement only functions for sending, and user
to implement (and pass me a pointer to) function for receiving. Dll
would call those receiving events in internally created thread.

The other idea is mechanism from sockets. Dll has both sending and
receiving functions, and the user must poll occasionally for receiving.

Is there something wrong with first idea? Which one's better?

Thanks.
 
My personal preference is something like your second solution.
The reason is that this is much easier to debug and maintain.


kind regards,
Bruno.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top