1个弹出式菜单和2个备忘录,其中的备忘录是从中调用的菜单(1 popup menu and 2 memo's, which memo is the menu invoked from)
我在表单上有2个备忘录,1个Tpopupmenu分配了弹出式菜单作为两个备忘录的弹出式菜单。 弹出式菜单中有一些菜单项分配给它,当我用鼠标右键单击备忘录并单击其onclick事件中的一个菜单项时,我想能够知道哪一个备忘录是菜单被调用,但无法弄清楚如何找出它是哪个备忘录!
任何人都可以给我一个关于如何检测潜在备忘录的指针。
谢谢
科林
I have 2 memo's on a form and 1 Tpopupmenu I have assigned the popup menu as the popup menu for both memos. The pop up menu has a couple of menuitem assigned to it, when I right mouse click on either of the memo's and click on one of the menu items on its onclick event I would like to be able to know which memo is the one where the menu was invoked from but cannot figure out how to find out which memo it was!!
Could anyone give me a pointer on how to detect the underlying memo.
thanks
colin
原文:https://stackoverflow.com/questions/10525173
最满意答案
对于UDP套接字客户端永远不会知道 - 服务器端将在接收缓冲区填满后才开始丢弃数据包。
另一方面,TCP实现流控制 。 服务器的内核将逐渐减少窗口,因此客户端将能够发送越来越少的数据。 在某些时候,窗口将下降到零。 此时,客户端填满其发送缓冲区并从
send(2)
接收错误。For UDP socket client will never know - the server side will just start dropping packets after the receive buffer is filled.
TCP, on the other hand, implements flow control. The server's kernel will gradually reduce the window, so the client will be able to send less and less data. At some point the window will go down to zero. At this point the client fills up its send buffer and receives an error from the
send(2)
.
相关问答
更多-
linux c java socket[2023-12-18]
你可以用jni调用本地c来实现通讯啊 或者把服务器的做成web serviesc,让java来调用 我是这样认为的。 -
linux socket 文件传输问题[2023-05-20]
如果采用TCP方式,只要通讯一建立,就无所谓客户端/服务器了,两端是对等的,你可以给我发数据,我也可以给你发数据,只需要简单的调用read/recv/write/send即可。 lz的问题可能在于客户端程序没有主动的发数据。 -
linux socket 怎么查看发送缓冲[2019-10-26]
int buflen = 65536*10; 设置读缓存大小 if(0!=setsockopt(m_sendUdpSock,SOL_SOCKET,SO_RCVBUF,&buflen,4)) { return OS_ERROR; } 设置写缓存大小 if(0!=setsockopt(m_sendUdpSock,SOL_SOCKET,SO_SNDBUF,&buflen,4)) { return OS_ERROR; } socklen_t getnumlen=4; 读取写缓存大小 if(0!=getsockopt ... -
如果你想在终端中看到你的缓冲区大小,你可以看看: /proc/sys/net/ipv4/tcp_rmem (供读) /proc/sys/net/ipv4/tcp_wmem (用于写) 它们分别包含三个数字,分别是最小值,默认值和最大内存大小值(以字节为单位)。 If you want see your buffer size in terminal, you can take a look at: /proc/sys/net/ipv4/tcp_rmem (for read) /proc/sys/net/ip ...
-
java socket接收器在linux上运行但在windows上运行(java socket receiver work on linux but not on windows)[2021-04-02]
嘿,谢谢你,这很好。 但还有其他方法比关闭Windows防火墙更好吗? 我正在使用Windows 7。 您可以打开用于UDP的特定端口(或TCP就是您正在使用的端口),而不是关闭整个防火墙。这将关闭防火墙,仅用于您需要的端口。 Hey thank you, that works well. But is there any other way better than turning off windows firewall? I'm using windows 7. Instead of turning o ... -
OS(内核)缓冲数据。 在Linux上,可以通过/ proc接口访问缓冲区大小参数。 有关更多详细信息,请参阅man 7 socket (到最后。) The OS (kernel) buffers the data. On Linux the buffer size parameters may be accessed through the /proc interface. See man 7 socket for more details (towards the end.)
-
对于UDP套接字客户端永远不会知道 - 服务器端将在接收缓冲区填满后才开始丢弃数据包。 另一方面,TCP实现流控制 。 服务器的内核将逐渐减少窗口,因此客户端将能够发送越来越少的数据。 在某些时候,窗口将下降到零。 此时,客户端填满其发送缓冲区并从send(2)接收错误。 For UDP socket client will never know - the server side will just start dropping packets after the receive buffer is fi ...
-
实际上, int socket (int __domain, int __type, int __protocol) __THROW 在glibc中实现, 并且glibc调用内核文件net / socket.c中实现的内核函数sys_socket。 asmlinkage long sys_socket(int family, int type, int protocol); Acutally, int socket (int __domain, int __type, int __protocol) __ ...
-
Linux上的TCP缓冲(TCP buffering on Linux)[2022-05-18]
它还取决于接收器窗口大小。 即使有100个标题,发送方也会根据接收方可用的窗口大小来推送数据。 没有启用扩展的TCP窗口大小最多只能达到64kb。 在您的情况下,这个大小是不够的,因为它至少需要(100-183Mbits)10MB缓冲区。 在Windows 7和更新的Linux OS中,TCP默认启用窗口缩放,可以将大小扩展到1GB。 启用TCP窗口缩放选项后,您可以将套接字缓冲区增加到更大的大小,例如50MB,这应该提供所需的缓冲。 It also depends on the receiver wind ... -
为了便于说明,假设协议允许服务器向客户端查询某些信息,例如(愚蠢的例子如下) hPutStr sock "Please choose between A or B" choice <- hGetLine sock case decode choice of Just A -> handleA Just B -> handleB Nothing -> protocolError 一切看起来很好......但服务器似乎挂了。 为什么? 这是因为hPutStr并未真正通过网络发送消 ...