完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我使用的是.onyv1.09,我试过演示web_net_server_nvm_mpfs,除了只有一个客户机可以连接到web服务器之外,一切都可以,尽管TCPIP_HTTP_NET_MAX_CONNECtions(4)的默认设置针对端口80和443,有人对此感到厌倦了吗?
以上来自于百度翻译 以下为原文 I am using hARMony v1.09, I tried demo web_net_server_nvm_mpfs, everything OK except only one client can connect to the web server although the default setting for TCPIP_HTTP_NET_MAX_CONNECTIONS (4), for both port 80 and 443,any body tired this? |
|
相关推荐
9个回答
|
|
连接的数量实际上表示HTTP服务器用于侦听传入请求的套接字的数量。因为大多数浏览器使用多个并行请求来访问服务器,所以连接的数量不等于指向服务器的浏览器的数量。如果浏览器要求更多的数据,则请求被维护但保持打开。这对于一个加密的连接来说非常好,因为您不想在每次重新打开连接时重新协商/握手。但是,如果没有足够的监听套接字,您将注意到服务器似乎对其他请求“没有响应”。我试图从多个(3)浏览器连接并且工作得很好:Linux的Chrome、Windows的Chrome+IE。我将HTTP连接增加到10,并向pro添加了额外的堆内存。注:WOLFSSL是内存饥渴。尝试一下,让我们知道,如果有任何问题。
以上来自于百度翻译 以下为原文 The number of connections actually represents the number of sockets that are used by the HTTP server to listen for incoming requests. Since most browsers use multiple parallel requests to access a server, the number of connections is not equal with the number of browsers that are pointed to the server. Also, what makes HTTP_NET different is that the connections are persistent - i.e. the sockets are not closed immediately after the requests are serviced but kept open, in case the browser asks for more data. This is great for an encrypted connection, because you don't want to renegotiate/handshake each time the connection is reopened. But, if not enough listening sockets, you'll notice that the server seems "unresponsive" to other requests. I've tried to connect from multiple (3) browsers and worked just fine: Chrome from Linux, Chrome + IE from Windows. I increased the HTTP connections to 10 and added extra heap memory to the project: wolfSSL is memory hungry. Give it a try and let us know if any issues. |
|
|
|
我做了一些性能测试,以检查我的PIC32MZ2048在多个连接上的性能。我在命令行中用curl从PIC下载一个“大”文件(1024k),使用多个控制台窗口,每个窗口都有一个curl调用。我使用wolfSSL进行加密,并将TCPIP_HTTP_NET_CHUNKS_NUMBER设置为80,将TCPIP_HTTP_NET_MAX_CONNECTIons设置为10。TCPIP_STACK_DRAM_SIZE也增加了。问题是:除了性能大幅下降(或多或少是预期的),6个连接中只有4个是好的。第4个连接非常慢,第5和第6个连接被建立,但是它们什么也没做。当我设置TCPIP_HTTP_N时EthMax连接到4,第四连接非常慢。任何人都能确认这种行为吗?
以上来自于百度翻译 以下为原文 I did some performance measurements, to check how well my PIC32MZ2048 performs with multiple connections. I am downloading a "large" file (1024k) from the PIC with curl in the command line, using multiple console windows with one curl call in each. I am using wolfSSL for encryption and have set TCPIP_HTTP_NET_CHUNKS_NUMBER to 80 and TCPIP_HTTP_NET_MAX_CONNECTIONS to 10. The TCPIP_STACK_DRAM_SIZE is also increased. The thing is: aside from a big performance drop (that was more or less expected), only 4 of 6 connections are good. The 4th connection is extremely slow and the 5th and 6th connections are established, but they are doing just nothing. When I set TCPIP_HTTP_NET_MAX_CONNECTIONS to 4, the 4th connection is extremely slow. Can anyone confirm that behavior? |
|
|
|
你的意思是客户机没有通过连接5和6请求任何数据吗?也许浏览器没有更多的数据可以并行打开吗?您能否在这里给出一些细节,比如通过.#1与.#4相比需要多长时间来传输1024KB文件?
以上来自于百度翻译 以下为原文 You mean the client doesn't request any data over connections 5 and 6? Maybe there is no more data for the browser to open in parallel? Can you give some details here, as to how long it takes to transfer the 1024 KB file over connection #1 as compared to connection #4? |
|
|
|
谢谢你汇报。我会尽快调查此事。你是说这个问题与加密无关,对吧?同样的事情发生在一个简单的连接上。我正在尝试建立一个测试平台。
以上来自于百度翻译 以下为原文 Thank you for reporting this. I'll be looking into it ASAP. So you're saying that this issue is not related to encryption, right? The very same thing happens on a plain connection. I'm trying to set up a test platform for this. |
|
|
|
对,我刚刚检查过是否有足够的空间。以下是6个连接被打开后的输出:我认为它很好。通常,当堆用完时,“Last heap error”被设置为某个值。谢谢您查看!
以上来自于百度翻译 以下为原文 Correct. I just checked if I really have enough space available. The following is the output after the 6 connections have been opened: FreeRTOS informations Free Heap ever 2243224 Currently free heap: 2251392 Task 0: 940 Task 1: 891 Task 2: 938 Task 3: 540 Task 4: 1766 Task 5: 967 Task Idle: 6 TCP Stack Informations Initial created heap size: 199904 Bytes Allocable block heap size: 97024 Bytes All available heap size: 106400 Bytes Last heap error: 0x0 Trace info: Module: 1, totAllocated: 265328, currAllocated: 10528, totFailed: 0, maxFailed: 0 Module: 4160, totAllocated: 960, currAllocated: 960, totFailed: 0, maxFailed: 0 Module: 2, totAllocated: 272, currAllocated: 272, totFailed: 0, maxFailed: 0 Module: 9, totAllocated: 624, currAllocated: 624, totFailed: 0, maxFailed: 0 Module: 10, totAllocated: 75968, currAllocated: 67264, totFailed: 0, maxFailed: 0 Module: 12, totAllocated: 112, currAllocated: 112, totFailed: 0, maxFailed: 0 Module: 15, totAllocated: 768, currAllocated: 768, totFailed: 0, maxFailed: 0 Module: 24, totAllocated: 12976, currAllocated: 12976, totFailed: 0, maxFailed: 0 I think its fine. Usually the "Last heap error" is set to something when the heap runs out. Thank you for looking into it! |
|
|
|
再次感谢您的关注!webserver之谜中的另一块我不知道。我在内部MAC驱动程序中搜索启用“自动流控制”的定义或标志,并在代码中搜索以找到处理暂停帧的东西,但在HTTP NET服务器中偶然发现了一个不同的值。我很尴尬地承认,我错过了TCPIP_HTTP_NET_FILE_PROCESS_BUFFERS_NUMBER值。把这个设置为6,我可以打开我的6个连接和没有摊位。此外,每个连接大约需要12秒来下载文件。除以我的6个连接每个文件2秒。所以吞吐量在每个连接之间是平等共享的。我不太明白为什么这是一个单独的值,因为我认为到HTTP NET服务器的每个连接都是基于文件的,但我猜您对此有自己的理由。但是我很好奇:是否(当前)有一个选项可以启用/禁用自动流控制?对于内部MAC,MHC中没有设置它的选项。ENC*驱动程序中有选项,但是启用或禁用该选项不会导致代码更改。当我正确理解时,流控制由“暂停帧”组成。我猜当连接为Full Duplex(drv_ethmac.c li)时,下面的行将自动启用流控制NE 741和声2.03b)?再次感谢!
以上来自于百度翻译 以下为原文 Thanks again for looking into it! Another piece in the webserver puzzle I did not know about. While searching for a define or a flag that enables the "Auto Flow Control" in the Internal MAC Driver and searching through the code to find something that handles the pause frames, I stumbled over a different value in the HTTP NET server. I am quite embarrassed to admit, that I missed the TCPIP_HTTP_NET_FILE_PROCESS_BUFFERS_NUMBER value. Setting this one also to 6, I can open my 6 connections and none stalls. Also, every connection takes around 12 sec to download the file. Divided by my 6 connections makes 2 sec per file. So the throughput is shared between each connection equally. I do not quite get why this is a separate value, since I thought every connection to the HTTP NET server is file based, but I guess you have you reason for it. But I am curious: Is there (currently) a option to enable/disable the Auto Flow Control? For the Internal MAC, there is no option in the MHC to set it. There are options in the ENC* drivers, but enabling or disabling the option does not lead to a code change. When I understood correctly, the flow control consists of a "pause frame". I guess the following line enables the flow control automatically, when the connection is Full Duplex (drv_ethmac.c line 741 Harmony 2.03b)? pauseType = (pMacD->mData.macConfig.ethFlags & TCPIP_ETH_OPEN_FDUPLEX) ? DRV_ETHMAC_PAUSE_CPBL_MASK : TCPIP_ETH_PAUSE_TYPE_NONE; Thanks again! |
|
|
|
你使用什么版本的和声?我使用的是2.03B,我的MHC没有这个选项。
以上来自于百度翻译 以下为原文 What version of Harmony do you use? I am using 2.03b and I do not have this option in my MHC.) Attached Image(s) |
|
|
|
嗨,我在当前的MHC插件V2.0.3.5中看不到…可能是下一个MHC插件的新选项;
以上来自于百度翻译 以下为原文 Hi, I don't see it either in the current MHC plugin v2.0.3.5 ... Probably a new option of the next MHC plugin ;=) Regards |
|
|
|
对不起,我的坏消息。这个添加没有在V2.03中实现。它将在V2.04中可用,如果您需要在发布之前添加它,请让我知道,我将分享代码。
以上来自于百度翻译 以下为原文 Sorry for the confusion, my bad. This addition didn't make it in v2.03. It will be available in v2.04. If you need to add it in there before the release, please let me know and I'll share the code. |
|
|
|
只有小组成员才能发言,加入小组>>
5362 浏览 9 评论
2093 浏览 8 评论
1992 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3274 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2305 浏览 5 评论
870浏览 1评论
756浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
699浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
750浏览 0评论
644浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-2-24 04:45 , Processed in 1.104785 second(s), Total 60, Slave 55 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191