blob: dc85eac6213e6ee971ce10ed7275f2651edef8ce [file] [log] [blame]
Alexander Afanasyevfe3b1502013-12-18 16:45:03 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/**
3 * Copyright (C) 2013 Regents of the University of California.
4 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
5 * See COPYING for copyright and distribution information.
6 */
7
8#ifndef NDN_UDPTRANSPORT_HPP
9#define NDN_UDPTRANSPORT_HPP
10
Alexander Afanasyeve2dcdfd2014-02-07 15:53:28 -080011#include "../common.hpp"
Alexander Afanasyevfe3b1502013-12-18 16:45:03 -080012#include "transport.hpp"
13
14namespace ndn {
Alexander Afanasyevf7ca3202014-02-14 22:28:31 -080015
Alexander Afanasyeve2e0d752014-01-03 13:30:30 -080016class UnixTransport : public Transport
17{
Alexander Afanasyevfe3b1502013-12-18 16:45:03 -080018public:
Alexander Afanasyevf7ca3202014-02-14 22:28:31 -080019 UnixTransport();
20
21 UnixTransport(const std::string& unixSocket);
Alexander Afanasyevfe3b1502013-12-18 16:45:03 -080022 ~UnixTransport();
23
Alexander Afanasyeve2e0d752014-01-03 13:30:30 -080024 // from Transport
Alexander Afanasyevf7ca3202014-02-14 22:28:31 -080025 virtual void
26 connect(boost::asio::io_service& ioService,
27 const ReceiveCallback& receiveCallback);
28
29 virtual void
Alexander Afanasyevfe3b1502013-12-18 16:45:03 -080030 close();
Alexander Afanasyeve2e0d752014-01-03 13:30:30 -080031
Alexander Afanasyevf7ca3202014-02-14 22:28:31 -080032 virtual void
33 send(const Block& wire);
34
Alexander Afanasyevfe3b1502013-12-18 16:45:03 -080035private:
36 std::string unixSocket_;
Alexander Afanasyevfe3b1502013-12-18 16:45:03 -080037
38 class Impl;
Alexander Afanasyev50ca6272014-01-09 23:23:54 -080039 ptr_lib::shared_ptr<Impl> impl_;
Alexander Afanasyevfe3b1502013-12-18 16:45:03 -080040};
41
42}
43
44#endif