1*3f982cf4SFabien Sanglard// Copyright 2018 The Chromium Authors. All rights reserved. 2*3f982cf4SFabien Sanglard// Use of this source code is governed by a BSD-style license that can be 3*3f982cf4SFabien Sanglard// found in the LICENSE file. 4*3f982cf4SFabien Sanglard 5*3f982cf4SFabien Sanglardpackage osp 6*3f982cf4SFabien Sanglard 7*3f982cf4SFabien Sanglard// TODO(jophba): 8*3f982cf4SFabien Sanglard// - Read and check the response message 9*3f982cf4SFabien Sanglard// - Make a nice object API with methods that can do more than one thing per connection 10*3f982cf4SFabien Sanglard// - Make it possible to have a presentation controller that is a server 11*3f982cf4SFabien Sanglard 12*3f982cf4SFabien Sanglardimport ( 13*3f982cf4SFabien Sanglard "context" 14*3f982cf4SFabien Sanglard) 15*3f982cf4SFabien Sanglard 16*3f982cf4SFabien Sanglardfunc StartPresentation(ctx context.Context, hostname string, port int, url string) error { 17*3f982cf4SFabien Sanglard msg := PresentationStartRequest{ 18*3f982cf4SFabien Sanglard RequestID: 1, 19*3f982cf4SFabien Sanglard PresentationID: "This is a Presentation ID. It must be very long.", 20*3f982cf4SFabien Sanglard URL: url, 21*3f982cf4SFabien Sanglard } 22*3f982cf4SFabien Sanglard 23*3f982cf4SFabien Sanglard return SendMessageAsClient(ctx, hostname, port, msg) 24*3f982cf4SFabien Sanglard} 25