pdcomm_secs1_stop
Function
Stops a started endpoint and discards its runtime state.
PdcommStatus pdcomm_secs1_stop(PdcommSecs1Endpoint *endpoint)Queued events, the message being sent, and partially received data are dropped without events and without invoking callbacks. Bytes already written stay on the wire. pdcomm_secs1_next_event() returns #PDCOMM_INVALID_STATE until the endpoint is started again.
Parameters
| Name | Description |
|---|---|
endpoint | Started endpoint. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when endpoint is NULL; #PDCOMM_BACKPRESSURE when a staged event must be retrieved first; #PDCOMM_INVALID_STATE when the endpoint is not started, or on a wrong-thread, concurrent, or reentrant call; #PDCOMM_POISONED when the endpoint is poisoned.
Notes
- Thread safety: call only on the creating thread.