IDmtpRouterPackageActorRequestAsync(Type, DmtpRouterPackage, Int32, CancellationToken) 方法
请求一个路由包,并等待响应。
命名空间: TouchSocket.Dmtp.RouterPackage程序集: TouchSocketPro.Dmtp (在 TouchSocketPro.Dmtp.dll 中) 版本:3.0.0+ccaf96084d09f972257496d1dd63b8ba3c1e44f0
Task<DmtpRouterPackage> RequestAsync(
Type packageType,
DmtpRouterPackage package,
int millisecondsTimeout = 5000,
CancellationToken token = default
)
Function RequestAsync (
packageType As Type,
package As DmtpRouterPackage,
Optional millisecondsTimeout As Integer = 5000,
Optional token As CancellationToken = Nothing
) As Task(Of DmtpRouterPackage)
abstract RequestAsync :
packageType : Type *
package : DmtpRouterPackage *
?millisecondsTimeout : int *
?token : CancellationToken
(* Defaults:
let _millisecondsTimeout = defaultArg millisecondsTimeout 5000
let _token = defaultArg token new CancellationToken()
*)
-> Task<DmtpRouterPackage>
- packageType Type
- 响应包类型
- package DmtpRouterPackage
- 请求的路由包
- millisecondsTimeout Int32 (Optional)
- 超时设定
- token CancellationToken (Optional)
- 可取消令箭
TaskDmtpRouterPackage返回的响应包