| // Copyright 2020 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| library bindingstest; |
| |
| using zx; |
| |
| closed protocol Test1 { |
| strict Echo(struct { |
| in string:optional; |
| }) -> (struct { |
| out string:optional; |
| }); |
| strict NoResponse(); |
| strict EmptyResponse() -> (); |
| strict TooManyBytesInResponse() -> (struct { |
| out vector<uint8>:MAX; |
| }); |
| strict TooManyHandlesInResponse() -> (resource struct { |
| out vector<zx.Handle>:MAX; |
| }); |
| strict -> Surprise(struct { |
| foo string; |
| }); |
| strict EchoHandleRights(resource struct { |
| h zx.Handle:<PORT, zx.Rights.READ | zx.Rights.TRANSFER | zx.Rights.DUPLICATE>; |
| }) -> (struct { |
| rights uint32; |
| }); |
| }; |