send_msg property

Pointer<NativeFunction<pj_status_t Function(Pointer<pjsip_transport> transport, Pointer<pjsip_tx_data> tdata, Pointer<pj_sockaddr_t> rem_addr, Int addr_len, Pointer<Void> token, pjsip_transport_callback callback)>> send_msg
getter/setter pair

Function to be called by transport manager to send SIP message.

@param transport The transport to send the message. @param packet The buffer to send. @param length The length of the buffer to send. @param op_key Completion token, which will be supplied to caller when pending send operation completes. @param rem_addr The remote destination address. @param addr_len Size of remote address. @param callback If supplied, the callback will be called once a pending transmission has completed. If the function completes immediately (i.e. return code is not PJ_EPENDING), the callback will not be called.

@return Should return PJ_SUCCESS only if data has been succesfully queued to operating system for transmission. Otherwise it may return PJ_EPENDING if the underlying transport can not send the data immediately and will send it later, which in this case caller doesn't have to do anything except wait the calback to be called, if it supplies one. Other return values indicate the error code.

Implementation

external ffi.Pointer<
    ffi.NativeFunction<
        pj_status_t Function(
            ffi.Pointer<pjsip_transport> transport,
            ffi.Pointer<pjsip_tx_data> tdata,
            ffi.Pointer<pj_sockaddr_t> rem_addr,
            ffi.Int addr_len,
            ffi.Pointer<ffi.Void> token,
            pjsip_transport_callback callback)>> send_msg;