aboutsummaryrefslogtreecommitdiff
path: root/cast
AgeCommit message (Collapse)Author
2020-12-10Refactor session message sendingJordan Bayles
This patch refactors session message sending to include multiple new message types, such as RPC and GET_STATUS. Integration tests are included. Bug: b/170756458, b/174188662 Change-Id: I8b5de8a668171e0ce7cb3e74651d207aa7911c24 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2506651 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
2020-12-10LoopingFileSender uses same Environment as SenderSession (and Senders).Yuri Wiitala
Bug: b/162542369 Change-Id: Ice9f7b50f7824c0214ffb40d84f0e54f9e9c23d9 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2556569 Reviewed-by: Jordan Bayles <jophba@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-12-09Remote virtual connections [3/3]: Connection messages are special-cased.Yuri Wiitala
Connection namespace messages are weird: The source_id and destination_id are NOT treated as "envelope routing information," like for all other namespaces. Instead, they are considered part of the payload data for CONNECT/CLOSE requests. Thus, they require special-case handling in VirtualConnectionRouter. Bug: b/162542369 Change-Id: I933ad63c01d9e6af9a58a67a2f05da3a76986c2c Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2546885 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
2020-12-09Remote virtual connections [2/3]: Add Open/CloseRemoteConnection().Yuri Wiitala
This patch adds two new methods to ConnectionNamespaceHandler, to allow Cast applications to establish and shutdown virtual connections over a socket to a remote device. Internally, this causes CONNECT, CONNECTED, and CLOSE messages to be sent between peers. Improved/Filled-in fields for CONNECT messaging (based on Chromium's implementation). Bug: b/162542369 Change-Id: I26c3de9a9f79140e553905a35b8ee455f94eaf7e Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2546883 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
2020-12-07Add presubmit check for unnecessary is_value checksJordan Bayles
This patch removes all unnecessary ErrorOr<>::is_value() checks and adds a presubmit handler for them. Change-Id: I2d1382113c00a5ba578dd23f5a15eae79d75c307 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2569369 Reviewed-by: Yuri Wiitala <miu@chromium.org>
2020-12-03Add JSON schema validation (using valijson)Jordan Bayles
This patch adds a dependency on the valijson library, and new JSON validation methods in util that use it. Bug=b/174759086 Change-Id: I3607a95dcefb3efff103cc3b5c7c14e8ee2b9739 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2527747 Reviewed-by: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org>
2020-12-02[HOTFIX] Fix Mac standalone buildJordan Bayles
Currently the standalone build doesn't work on the bots, so it tends to break without warning. This patch fixes an issue where a static member variable that has a definition but not a separate declaration causes a linking error on Mac OS X. Not sure why it doesn't happen on other platforms. For more information on this issue, see: https://stackoverflow.com/questions/8016780/undefined-reference-to-static-constexpr-char TBR=miu@chromium.org Change-Id: I97a7624ef77f85ed0995052d6db5e28834a88dff Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2568900 Reviewed-by: Jordan Bayles <jophba@chromium.org>
2020-12-01Apply FlatMap patch feedbackJordan Bayles
See comment on this file in this CL submission: https://chromium-review.googlesource.com/c/openscreen/+/2552695 Change-Id: I6423a7a8939ed283c719e775cfd381cd99e73c43 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2565680 Reviewed-by: Yuri Wiitala <miu@chromium.org>
2020-11-30Add discovery and console menu interface to standalone sender.Yuri Wiitala
This patch allows the standalone sender to be run in one of two ways: 1) by specifying an IP:port for direct connection to a Cast Receiver, or 2) by specifying a network interface for LAN discovery of Cast Receivers. In case #2, once Cast Receiver(s) have been discovered, a console menu is printed and asks the user to choose one. Bug: b/162542369 Change-Id: I6c46bd0c868dbea3d6e0f7ff1960af4ab86c2a1c Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2556568 Reviewed-by: Jordan Bayles <jophba@chromium.org>
2020-11-30Remote virtual connections [1/3]: Refactor VCRouter to extend VCManager.Yuri Wiitala
This is a clean-up patch to simplify code structure. Before this patch, all clients of VirtualConnectionRouter need to instantiate both a VirtualConnectionManager and a VirtualConnectionRouter, and then pass the former (by pointer) to the latter. After this patch, VCR extends VCM, and clients need not worry about a VCM. Bug: b/162542369 Change-Id: I0dff69819d9b5282a43643a2da0fe33e7bf0a3fd Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2546803 Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
2020-11-25Add new FlatMap utility classJordan Bayles
This patch adds a new FlatMap class in our utility component. This class is intended as a drop-in replacement for std::vector<std::pair<key,value>>, which ends up getting used as a lower-cost std::map<key, value>, with some additional convenience functions to make it behave more like a map. This patch also replaces all std::vector<std::pair<>> declarations in favor of FlatMap. Change-Id: I1cbdc70998c9cc4754d20799ca0b4a6d30cb397a Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2552695 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com>
2020-11-25Logging cleanupsJordan Bayles
This patch removes some test-specific logging code in favor of death tests, and makes the OSP_NOTREACHED macro actually be annotated as [[noreturn]], so you don't have to put a bogus return statement after it. Change-Id: I6a6a271182061cbd98593ac0ae79347e48da5bc7 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2555597 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
2020-11-24Fix supported_address_families DCHECK in ServiceInstance ctor.Yuri Wiitala
The original DCHECK was mandating IPv4/6 be used if the network interface supports it, even if a client may not want to use IPv4/6. This patch changes the logic to the intended sanity-check: IPv4/6 can only be considered supported if the network interface has an IPv4/6 address. The client can still choose whether to use it or not. Bug: b/162542369 Change-Id: I76e3983eb36c63769d4574e75e07df51dd4540d4 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2552426 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com>
2020-11-24Bring openscreen::cast::ServiceInfo parsing/validation up-to-spec.Yuri Wiitala
1. More-thorough validation-before-serialization (ServiceInfo::IsValid()), ensuring required fields are set, within valid ranges, and will fit within the TXT record field maximum size. 2. Make "model name" an optional field (was being treated as required). 3. Range-checks of untrusted input in DnsSdInstanceEndpointToServiceInfo(). 4. Rename kXYZId[] char constants to kXYZKey[], since they are key names in the record, not identifiers. 5. Removed DnsSdTxtRecord::SetValue() overload for uint8_t values, since it was being erroneously used to set values that were supposed to be decimal-formatted number strings (i.e., not a raw byte value!). 6. Add a regression test, to ensure a real-world TXT record from a Chromecast Ultra is successfully converted into a ServiceInfo. Bug: b/162542369 Change-Id: I06633c6c54dd2f6e6367033381b100949b08be8b Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2552423 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com>
2020-11-24Add new enum name tableJordan Bayles
Add a new using statement and simple helper methods for storing enum names as strings. Doing this instead of porting Chrome's EnumTable class. Bug: crbug.com/openscreen/111 Change-Id: Ib92be8d1837782fd28398e96e3e3a50674d4a07f Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2545125 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-11-20Implement a more-specific AppAgent::IsConnectionAllowed() policy.Yuri Wiitala
Prevents connections if an app is not launched. Or, if an app is launched, connections must match the "transportId" that was in the last RECEIVER_STATUS update. Bug: b/162542369 Change-Id: I99afcf8a4c80d015505fa688b7372b83ae650578 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2552433 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org>
2020-11-20Allow Cast Standalone Receiver to bind to loopback device.Yuri Wiitala
It's often useful for development to run the standalone receiver on the loopback interface, to prevent spurious traffic on the LAN. This patch allows its use, but includes a check that will disable discovery. Bug: b/162542369 Change-Id: I574dafbddd60869324623e4ada9aabf501226b9d Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2552437 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org>
2020-11-20CastSocketMessagePort: Filter broadcast messages.Yuri Wiitala
Adds a filter for broadcast messages since MessagePorts represent 1-to-1 connections. Also, clarified a comment for GetSocketId() in the header file. Bug: b/162542369 Change-Id: Ib30524d2759cf6ef5184ff2881735dcdcd3151dc Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2546886 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org>
2020-11-13Fix Bug in Cast Core ProtoRyan Keane
PiperOrigin-RevId: 342003972 Change-Id: Id2d190620308c036be72d4288617c60f5bc40287 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2536772 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Ryan Keane <rwkeane@google.com>
2020-11-13Internal changeShawn Quereshi
PiperOrigin-RevId: 341734524 Change-Id: Icf70dd5f085eca0eda0d6446a1fe6d0e3077b1c0 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2536771 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Ryan Keane <rwkeane@google.com>
2020-11-12Internal changeAlex Leung
PiperOrigin-RevId: 340737217 Change-Id: Ic5a1ba5948802fd28a4e3984029fca72f681ef03 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2535871 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Ryan Keane <rwkeane@google.com>
2020-11-12Internal changeShawn Quereshi
PiperOrigin-RevId: 339915271 Change-Id: I59caf1e22f011b1de6a37145a84fbd88097abc87 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2533504 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Ryan Keane <rwkeane@google.com>
2020-11-11[Open Screen] Fix noexcept usage.mark a. foltz
This patch consistently annotates move constructors with noexcept. This enables move optimization when std::vector is resized. Notes: - LLVM libcxx has been patched to no longer require this when -fno-exceptions is used [1] - However, libc++ still requires it as far as I can tell - There are no compilation issues with noexcept on clang or GCC so MAYBE_NOEXCEPT is no longer necessary - noexcept is only meaningful on declarations, not definitions Background: https://groups.google.com/a/chromium.org/g/chromium-dev/c/8i4tMqNpHhg [1] https://github.com/llvm/llvm-project/commit/2a573784f3679a7abab921018eb1c585dce8e669 Bug: b/160731444 Change-Id: Ib83e5c2fa5a2624665b76a3b2e0f6351a9196f8f Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2533433 Commit-Queue: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
2020-11-09Standalone Receiver: Integration with ApplicationAgent.Yuri Wiitala
Makes the standalone cast receiver a full Cast V2 Receiver with a launchable "Mirroring App." Replaces "CastAgent" with three modules: MirroringApplication (new): A front-end launcher and message port for a ReceiverSession (and a StreamingPlaybackController, which manages the playback UI). ApplicatonAgent (prior patch): An implementation of the Cast V2 Application Control spec, able to launch applications and route messages to/from them. CastService (new): Glues it all together, from a network server socket, through the Cast Channel infrastructure, through the ApplicationAgent and MirroringApplication, to a ReceiverSession and playback GUI. Bug: b/170134354 Change-Id: I9640a3d0c40f174d9f03bc26ee3c2f160736e290 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2481853 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org>
2020-11-09Add Control Protocol SchemasJordan Bayles
Currently, there is not a good single source of truth for mirroring control protocol specifications. This patch attempts to rectify that by creating a JSON Schema for Streaming Application, Mirroring, and Remoting messages, with the hopes of using it for validation. Change-Id: I197852df49efc21a7e9220bea7ade8e3d9839c5b Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2519844 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org>
2020-11-09[Open Screen] Fix two unitialized reads dicovered by MSAN.mark a. foltz
- Fix read of unitialized watch duration in OSP - Fix uninitialized endpoint_id in OSP Also, update Subscription to follow rule of 3/5, and simplify how query IDs are allocated in the cast_app_discovery_service. Bug: chromium:1143946 Change-Id: I78f3dd630626eaf47930d8a5c9bfdc3d05b49fb6 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2511074 Commit-Queue: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
2020-11-05[application_agent test] Updated use of protosAndres Medina
New Protobuf version marks messages as final. Modifying test to accomodate this. Bug: 1144985 Change-Id: If211677e537321b557b53579f3645604484962a4 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2522291 Reviewed-by: mark a. foltz <mfoltz@chromium.org> Commit-Queue: mark a. foltz <mfoltz@chromium.org>
2020-11-04Factor WaitForCondition to reuse in testsbtolsch
Bug: None Change-Id: Ia93e7d958c854a268974940263cd0b7b82213190 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2514585 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Brandon Tolsch <btolsch@chromium.org>
2020-11-03Hotfix: fix standalone sender stringprintf includeJordan Bayles
Currently the standalone sender doesn't build due to a missing include. This patch fixes this by adding the include. TBR=miu@chromium.org Change-Id: I113d9fd78a676cd4aad9d4366a53fbbfb2b461c3 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2514593 Reviewed-by: Jordan Bayles <jophba@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-10-31Update Cast Media Runtime files that were missedAlex Leung
PiperOrigin-RevId: 339740556 Change-Id: Ic67271022d723ec4a248711b7b2fc4bb69a611a2 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2512404 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Ryan Keane <rwkeane@google.com>
2020-10-30Import updated Cast Media Runtime Proto DefinitionsAlex Leung
PiperOrigin-RevId: 339083726 Change-Id: I307745efed742a1038959bcf2754eb1f7220d5af Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2511050 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Ryan Keane <rwkeane@google.com>
2020-10-27Add remoting protoJordan Bayles
This patch adds a cleaned up media remoting proto to cast/streaming. This will replace Chrome's media_remoting_rpc.proto: https://source.chromium.org/chromium/chromium/src/+/master:media/remoting/media_remoting_rpc.proto Bug: b/171497623 Change-Id: I2285b4299d4361472b19a303ab25f332a1d67c86 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2490876 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
2020-10-26Add StringPrintf() wrapper utility.Yuri Wiitala
Adds an efficient wrapper around std::snprintf() that returns the formatted result in a std::string. Background: The issue of either 1) wanting to use absl::StrFormat() without bloating our binary sizes, or 2) manually writing char[] buffer code around std::snprintf() has come up several times over the past year or so. So, this new utility is about reducing friction and improving future developer velocity. Change-Id: Ie898f91575852b06d59844dd564a0da03df1f7ed Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2487768 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org> Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
2020-10-21Add SessionMessager classJordan Bayles
This patch cleans up message logic in the ReceiverSession and SenderSession classes, reducing duplicate code and ensuring more predictable behavior. A new SessionMessager class is added, using a callback model to handle message types. Bug: b/168238707 Change-Id: I44b3aa41f10c53ef98d9044be18c6fbf8f093412 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2462065 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
2020-10-20[Cast Streaming] Remove deprecated ConfiguredReceiver fieldsJordan Bayles
This patch deletes the deprecated ConfiguredReceiver fields from our public API. Bug: 1132109 Change-Id: I2f9d1c254d6bdfb7e33cae151157d95760e9ac16 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2464917 Reviewed-by: Yuri Wiitala <miu@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-10-17Mask dev cert arg when build_with_chromiumJordan Bayles
This patch updates the cast_allow_developer_certificate arg to only be defined when !build_with_chromium, to avoid multiple definition errors. Change-Id: Ib7eb92e93bb79286270e17317c1e05fccf302ba1 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2469158 Reviewed-by: Yuri Wiitala <miu@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-10-15Allow loopback for discoveryJordan Bayles
Although not always super useful, we do occasionally want to allow loopback adapters for discovery. This patch removes a CHECK for the hardware address (which is {} for the loopback interface) in favor of warning. Change-Id: Ica4253e176ee58a67bb7a8d19738782007b08ecb Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2472530 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-10-09Add build flag for self-signed certsJordan Bayles
This patch changes the standalone receiver and sender implementations to use a new CAST_ALLOW_DEVELOPER_CERTIFICATE build flag/preprocessor macro for gating usage of self-signed certificates. When false, the cast_receiver app is disabled, and the cast_sender app will only connect to receivers using a proper Google cert. When the build flag is enabled, the cast sender can use any self-signed certificate as long as the CA bit is set. The cast receiver can either take a self-signed certificate and its private key, or generate both the private key and the certificate. The resulting private key and certificate are written out to files, currently: ./generated_root_cast_receiver.(key|crt) and can then be used with a cast_sender to start a session. Bug: b/169796278 Change-Id: I03675f85ac0b2bda76daf1bf11d9d7df064d0b8f Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2443934 Reviewed-by: Jordan Bayles <jophba@chromium.org> Reviewed-by: Brandon Tolsch <btolsch@chromium.org> Reviewed-by: mark a. foltz <mfoltz@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-10-07Add CastSocket close e2e testbtolsch
This change adds E2E tests for closing either end of a CastSocket. This also fixes the SSL shutdown behavior of TlsConnectionPosix, which was previously untested. Bug: b/154085182 Change-Id: Ie1b376b3487cec23ddf1df3fc3920ae562781099 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2442075 Commit-Queue: Brandon Tolsch <btolsch@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com>
2020-10-05Cast Receiver Application AgentYuri Wiitala
Adds an agent that handles the Cast V2 Application Control messaging, and implements a Cast Application "switcher" and application message router. Added a MakeUniqueSessionId() utility to de-dupe functions that generate transport IDs for Cast Channel messaging. Bug: b/170134050 Change-Id: I1d79e7e3c479dd4f3dc35406b0e64046b4fa011b Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2449149 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org>
2020-10-05Improve OFFER message validationJordan Bayles
This patch improves the validation code for OFFER message handling. Change-Id: I3967e9dfefee4b956c056ac4ab434ca850be34f8 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2446710 Reviewed-by: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-10-05Initial import of Cast Core protocol message definitions.Googler
BUG: b/164169864 PiperOrigin-RevId: 334908898 Change-Id: I90746646c40e1c00d9ffbae3ec9774c2f099d5bd Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2446709 Commit-Queue: mark a. foltz <mfoltz@chromium.org> Reviewed-by: Brandon Tolsch <btolsch@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com>
2020-10-03Improve error-Answer responsesJordan Bayles
This patch improves error handling in the ReceiverSession, by sending an error-Answer response in more cases, such as when the offer is missing a mandatory field or a value is of the wrong type. Bug: b/164538371 Change-Id: I73f842bf99613710a844e648f31ff35734fab347 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2446596 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
2020-10-02[Cast Channel] Add broadcast routing in VirtualConnectionRouter.Yuri Wiitala
Replaces TODO comments with the implementation. :) This change is needed for a soon-upcoming patch that will introduce a basic Cast Agent (service for handling Cast V2 Application Control messages) for a Cast Receiver. The CastMessageHandler interface API contract was adjusted to allow a nullptr CastSocket* argument, when a broadcast message comes from a local peer instead of a remote sender. Bug: b/169453993 Change-Id: Idbc698336e01022b8e7090498e882c66bb4922b0 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2433087 Commit-Queue: Yuri Wiitala <miu@chromium.org> Reviewed-by: Brandon Tolsch <btolsch@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org>
2020-10-02Add more trace logging to standalone_ implsJordan Bayles
This patch adds additional trace logging to the standalone receiver and sender applications, in order to allow more diagnostics and performance analysis. Change-Id: I504f391f1a46b6bf0ac44a74bce244d8d36433aa Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2433430 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-10-01Delete unused private key der.Jordan Bayles
Change-Id: I5071c4f7fa9a85d62ae9956d6f4945e6a3730c1d Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2443929 Reviewed-by: Jordan Bayles <jophba@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-10-01Duplicate sources for standalone_receiver e2eJordan Bayles
This patch removes e2e_tests dependency on the standalone_receiver source set, instead including the files directly. This fixes a bug on Mac OS X where we attempt to generate an SDL window and it crashes the e2e tests package. Change-Id: Ib6d04870d90b1d20535863609c218f24270d3832 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2440267 Reviewed-by: Brandon Tolsch <btolsch@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-09-30Properly use message router for cast message portJordan Bayles
This patch updates the CastSocketMessagePort to properly use the VirtualConnectionRouter::Send method instead of directly calling on the socket. This also includes a change to register new connections on the VirtualConnectionManager. Change-Id: I7dab0f2d2595f7c5a5a78bfa8444e22e7f083dd1 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2432093 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org>
2020-09-29Fix PEM_read callsJordan Bayles
This patch moves PEM_read calls to using long types plus NOLINT directives. Change-Id: Ib8196599ac8b51deba623f48b252ab8a229b2563 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2438680 Reviewed-by: Jordan Bayles <jophba@chromium.org> Reviewed-by: Yuri Wiitala <miu@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
2020-09-29Add friendly, model name command line argsJordan Bayles
This patch rectifies a TODO in the standalone receiver implementation for adding command line arguments to set the friendly name and model name of the receiver. Change-Id: I0148339585624784846b6dcc8b097114ece28514 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2432091 Reviewed-by: Yuri Wiitala <miu@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>