Skip to content

Instantly share code, notes, and snippets.

@yifu
Created September 21, 2012 15:07
Show Gist options
  • Select an option

  • Save yifu/3762050 to your computer and use it in GitHub Desktop.

Select an option

Save yifu/3762050 to your computer and use it in GitHub Desktop.
#include "ace/Event_Handler.h"
#include "ace/SOCK_Stream.h"
#include <iostream>
class ProducerEventHandler : public ACE_Event_Handler
{
public:
ACE_SOCK_Stream &peer(void) { return sock_; }
int open(void);
virtual ACE_HANDLE get_handle() const
{ return sock_.get_handle(); }
virtual int handle_input ( ACE_HANDLE fd = ACE_INVALID_HANDLE );
virtual int handle_output( ACE_HANDLE fd = ACE_INVALID_HANDLE );
virtual int handle_close ( ACE_HANDLE handle, ACE_Reactor_Mask close_mask );
private:
ACE_SOCK_Stream sock_;
ACE_Message_Queue<ACE_NULL_SYNCH> ouput_queue_;
};
int main()
{
std::cout << "hello world" << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment