// startCall starts a call to echoStream and returns the arg3 reader and writer.
startCall starts a call to echoStream and returns the arg3 reader and writer.
// startCall starts a call to echoStream and returns the arg3 reader and writer .
func (h streamHelper) startCall(ctx context.Context, ch *Channel, hostPort, serviceName string) (ArgWriter, ArgReader) {
	call, err := ch.BeginCall(ctx, hostPort, serviceName, "echoStream", nil)
	require.NoError(h.t, err, "BeginCall to echoStream failed")
	require.NoError(h.t, NewArgWriter(call.Arg2Writer()).Write(nil), "Write empty headers failed")
	writer, err := call.Arg3Writer()
	require.NoError(h.t, err, "Arg3Writer failed")
	require.NoError(h.t, writer.Flush(), "Arg3Writer flush failed")
	response := call.Response()
	var arg2 []byte
	require.NoError(h.t, NewArgReader(response.Arg2Reader()).Read(&arg2), "Read headers failed")
	require.False(h.t, response.ApplicationError(), "echoStream failed due to application error")
	reader, err := response.Arg3Reader()
	require.NoError(h.t, err, "Arg3Reader failed")
	return writer, reader
}
func ( h streamHelper ) startCall ( ctx context . Context , ch * Channel , hostPort , serviceName string ) ( ArgWriter , ArgReader ) { call , err := ch . BeginCall ( ctx , hostPort , serviceName , " " , nil ) require . NoError ( h . t , err , " " ) require . NoError ( h . t , NewArgWriter ( call . Arg2Writer ( ) ) . Write ( nil ) , " " ) writer , err := call . Arg3Writer ( ) require . NoError ( h . t , err , " " ) require . NoError ( h . t , writer . Flush ( ) , " " ) response := call . Response ( ) var arg2 [ ] byte require . NoError ( h . t , NewArgReader ( response . Arg2Reader ( ) ) . Read ( & arg2 ) , " " ) require . False ( h . t , response . ApplicationError ( ) , " " ) reader , err := response . Arg3Reader ( ) require . NoError ( h . t , err , " " ) return writer , reader }
startCall starts a call to echoStream and returns the arg3 reader and writer.
startCall starts a call to echoStream and returns the arg3 reader and writer .
// Write empty headers // Flush arg3 to force the call to start without any arg3. // Read empty Headers