Skip to content

Commit

Permalink
upgrade WebTunnelLibrary to latest upstream version, remove unneeded …
Browse files Browse the repository at this point in the history
…files
  • Loading branch information
obiltschnig committed Aug 26, 2019
1 parent 9a2afd3 commit 0e2b625
Show file tree
Hide file tree
Showing 11 changed files with 76 additions and 1,684 deletions.
3 changes: 1 addition & 2 deletions platform/WebTunnel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

include $(POCO_BASE)/build/rules/global

objects = LocalPortForwarder RemotePortForwarder PortReflector \
TunnelSocket TunnelSocketImpl \
objects = LocalPortForwarder RemotePortForwarder \
SocketDispatcher Protocol

target = PocoWebTunnel
Expand Down
310 changes: 0 additions & 310 deletions platform/WebTunnel/include/Poco/WebTunnel/PortReflector.h

This file was deleted.

22 changes: 20 additions & 2 deletions platform/WebTunnel/include/Poco/WebTunnel/Protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class WebTunnel_API Protocol
///
/// 5. Data
///
/// Data to be forwarded to the peer.
/// Data to be forwarded to the peer through a channel.
///
/// 0 1 2 3
/// +--------+--------+--------+--------+
Expand All @@ -89,7 +89,24 @@ class WebTunnel_API Protocol
/// | |
/// +-----------------------------------+
///
/// 6. General Error
/// 6. Properties Update
///
/// Updates to device properties.
///
/// 0 1 2 3
/// +--------+--------+--------+--------+
/// | 0x40 | 0x00 | 0x00 |
/// +--------+--------+--------+--------+
/// | count | <keyValuePair>*<count> |
/// | |
/// +-----------------------------------+
///
/// count is number of following key/value pairs (UInt8).
/// <keyValuePair> is two strings in Poco::BinaryWriter format
/// (7-bit encoded length followed by raw bytes; no terminating
/// zero).
///
/// 7. General Error
///
/// 0 1 2 3
/// +--------+--------+--------+--------+
Expand All @@ -106,6 +123,7 @@ class WebTunnel_API Protocol
WT_OP_OPEN_CONFIRM = 0x11, /// Confirms channel has been opened.
WT_OP_OPEN_FAULT = 0x81, /// Error opening a channel.
WT_OP_CLOSE = 0x02, /// Close a channel (uncomfirmed).
WT_OP_PROP_UPDATE = 0x40, /// Properties update
WT_OP_ERROR = 0x80 /// General error notification, closes a channel.
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class WebTunnel_API RemotePortForwarder
const Poco::Timespan& remoteTimeout() const;
/// Returns the timeout for the remote connection.

void updateProperties(const std::map<std::string, std::string>& props);
/// Transmits properties (key-value pairs) to the remote peer.

protected:
bool multiplex(SocketDispatcher& dispatcher, Poco::Net::StreamSocket& socket, Poco::UInt16 channel, Poco::Buffer<char>& buffer);
void multiplexError(SocketDispatcher& dispatcher, Poco::Net::StreamSocket& socket, Poco::UInt16 channel, Poco::Buffer<char>& buffer);
Expand Down
Loading

0 comments on commit 0e2b625

Please sign in to comment.