tcp:socket.TCPSocketsocket.constructTCPSocketInstance()lethexStr"aabb01"constbyteArraynewArray()for(leti0;i<hexStr.length;i+2){byteArray.push(parseInt(hexStr.substring(i,i+2),16))}letbuffernewUint8Array(byteArray)lettcpSendOptions:socket.TCPSendOptions{data:buffer}tcp.send(tcpSendOptions,(err:BusinessError){if(err){console.log('sendfail');return;}console.log('sendsuccess');})如果data类型是字符...
调用一下方法,结果回调无响应以QR码为例,码图生成参数letoptions:generateBarcode.CreateOptions{scanType:'https:www.huawei.com',height:300,width:300}码图生成接口,成功返回PixelMap格式图片generateBarcode.createBarcode(url,options,(error:BusinessError,result:image.PixelMap){if(error){return;}})
https证书更换之后,所有的请求全部报【{"message":"{“code”:2300060,"message":"SSLpeercertificateorSSHremotekeywasnotOK"}】了,这种情况怎么解决?
项目中的文件下载因涉及文件重要性,后端只支持POST请求方式,需传参加密参数才能进行下载。请问关于文件下载功能有POST请求的示例代码?
在测试过程中,发现某些进程异常退出难以确定是因为什么退出的。例如App没有使用backgroundTaskManager.startBackgroundRunning启动长时任务,并且长时在后台使用AudioCapturer录制麦克风,则有概率会异常退出。但在出现异常退出之后,非常难以追溯并确定异常出现的原因。1、查看了datalogfaultlog,并无生成。2、查看了dataloghiloghilogkmsg.xxx.gz,里面并没有记在类似appexitcode之类的内容。3、查看了dataloghiloghilog.xx...
agc后台已配置好推送服务,但是尝试在后台进行推送到指定设备,指定设备无法收到通知,如图所示
在使用customInfoWindow这个新功能给marker添加信息窗的时候这样的写法不弹出如何处理
华为推荐使用的监听接口,订阅崩溃事件(ArkTS)有90%的情况都拿不到externallog日志,怀疑是因为:logoverlimittrue
在js中AVRecorder里面的拿到的inputSurface,无法通过OHNativeWindowCreateNativeWindowFromSurfaceId创建,显示无效参数?两个surfaceId不互通?
使用this.mapController.addPolyline创建的折现是否可以删除或者隐藏
import{connection}from'kit.NetworkKit';import{BusinessError}from'kit.BasicServicesKit';exportclassSNMDemo{constructor(){this.init();}init(){console.info('initstart');letnetSpecifier:connection.NetSpecifier{netCapabilities:{bearerTypes:[connection.NetBearType.BEARERCELLULAR,connection.NetBearType.BEARERWIFI,connection.NetBearType.BEARERETHERNET],指定网络能力为InternetnetworkCap:[connection.NetCa...
操作步骤:1、入口模块配置权限如下:"requestPermissions":[{"name":"ohos.permission.INTERNET","reason":"$string:internetreason","usedScene":{"abilities":["EntryAbility"],"when":"inuse"}},{"name":"ohos.permission.GETNETWORKINFO","reason":"$string:networkreason","usedScene":{"abilities":["EntryAbility"],"when":"inuse"}}]2、并在自建feature下面的一个子模块引用common下的connection模块,发送广播步骤如...
Timestamp:2024070216:51:45.995Reason:Signal:SIGBUS(BUSADRALN)0x0000000000000001FaultthreadInfo:Tid:63738,Name:ngchong.minimoo
在文件上传下载场景中,需要基于tcp做上传下载分片传输、断点续传、qos加速,基于udp的弱网传输优化等操作。如果我们想基于RemoteCommunicationKit(rcp)做文件传输场景的协议优化,是否可以申请DATATRANSFER长时任务实现进程后台活跃?
hms.collaboration.rcp每次都会走蜂窝网络,不再受pathPreference控制了,之前是通过auto与cellular控制,auto默认是wifi,传入cellular之后才会走蜂窝网络。
使用http.createHttp().request方法发送网络请求概率收到403,HarmonyOS是否支持类似tcpdump的抓包工具供用户分析该问题?
全栈若城 的精彩回答获得了0 赞同
wx662108d97e2cc 的精彩回答获得了0 赞同
hm673c38c974de6 的精彩回答获得了0 赞同
hm673c38c974de6 的精彩回答获得了0 赞同
hm673c38ebd6bf2 的精彩回答获得了0 赞同