22 #ifndef NDN_TCP_TRANSPORT_LITE_HPP
23 #define NDN_TCP_TRANSPORT_LITE_HPP
25 #include "../../c/errors.h"
26 #include "../../c/transport/transport-types.h"
27 #include "../util/dynamic-uint8-array-lite.hpp"
28 #include "../encoding/element-listener-lite.hpp"
59 isLocal(
const char *host,
bool& result);
81 send(
const uint8_t* data,
size_t dataLength);
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:35
An ElementListenerLite holds an OnReceivedElementLite function pointer.
Definition: element-listener-lite.hpp:37
TcpTransportLite(DynamicUInt8ArrayLite &buffer)
Create a TcpTransport with default values for no connection yet and to use the given DynamicUInt8Arra...
A DynamicUInt8ArrayLite holds a pointer to an allocated array, the length of the allocated array...
Definition: dynamic-uint8-array-lite.hpp:35
ndn_Error isLocal(const char *host, bool &result)
Determine whether this transport connecting to the host is to a node on the current machine; results ...
ndn_Error connect(const char *host, unsigned short port, ElementListenerLite &elementListener)
Connect with TCP to the host:port.
ndn_Error close()
Close the socket.
static TcpTransportLite & downCast(ndn_TcpTransport &transport)
Downcast the reference to the ndn_TcpTransport struct to a TcpTransportLite.
Definition: tcp-transport-lite.hpp:113
ndn_Error processEvents(uint8_t *buffer, size_t bufferLength)
Process any data to receive.
ndn_Error send(const uint8_t *data, size_t dataLength)
Send data to the socket.
Definition: transport-types.h:35
Definition: tcp-transport-lite.hpp:32