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.
 
Back
Top