GRPC PHP  1.62.0
Public Member Functions
Grpc\UnaryCall Class Reference

Represents an active call that sends a single message and then gets a single response. More...

Public Member Functions

 start ($data, array $metadata=[], array $options=[])
 Start the call. More...
 
 wait ()
 Wait for the server to respond with data and a status. More...
 
 getMetadata ()
 
- Public Member Functions inherited from Grpc\AbstractCall
 __construct (Channel $channel, $method, $deserialize, array $options=[])
 Create a new Call wrapper object. More...
 
 getTrailingMetadata ()
 
 getPeer ()
 
 cancel ()
 Cancels the call. More...
 
 setCallCredentials ($call_credentials)
 Set the CallCredentials for the underlying Call. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Grpc\AbstractCall
 _serializeMessage ($data)
 Serialize a message to the protobuf binary format. More...
 
 _deserializeResponse ($value)
 Deserialize a response value to an object. More...
 
- Protected Attributes inherited from Grpc\AbstractCall
 $call
 
 $deserialize
 
 $metadata
 
 $trailing_metadata
 

Detailed Description

Represents an active call that sends a single message and then gets a single response.

Member Function Documentation

◆ getMetadata()

Grpc\UnaryCall::getMetadata ( )
Returns
mixed The metadata sent by the server

Reimplemented from Grpc\AbstractCall.

◆ start()

Grpc\UnaryCall::start (   $data,
array  $metadata = [],
array  $options = [] 
)

Start the call.

Parameters
mixed$dataThe data to send
array$metadataMetadata to send with the call, if applicable (optional)
array$optionsAn array of options, possible keys: 'flags' => a number (optional)

◆ wait()

Grpc\UnaryCall::wait ( )

Wait for the server to respond with data and a status.

Returns
array [response data, status]

The documentation for this class was generated from the following file: