summaryrefslogtreecommitdiff
path: root/protocols/ace/RMCast/Socket.h
blob: 3fe68d2604c87960e911a5a070daf112e95834d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// -*- C++ -*-

// file      : ace/RMCast/Socket.h
// author    : Boris Kolpackov <boris@kolpackov.net>
// cvs-id    : $Id$

#ifndef ACE_RMCAST_SOCKET_H
#define ACE_RMCAST_SOCKET_H

#include "ace/Auto_Ptr.h"
#include "ace/INET_Addr.h"

#include "RMCast_Export.h"


namespace ACE_RMCast
{
  class Socket_Impl;

  class ACE_RMCast_Export Socket
  {
  public:
    virtual
    ~Socket ();

    Socket (ACE_INET_Addr const& a, bool loop = true);

  public:
    virtual void
    send (void const* buf, size_t s);

    virtual size_t
    recv (void* buf, size_t s);

    // Retrun the size of the next message. Block if message is
    // not available.
    //
    virtual size_t
    size ();

  private:
    ACE_Auto_Ptr<Socket_Impl> impl_;
  };
}


#endif  // ACE_RMCAST_SOCKET_H