46fo
V2EX  ›  问与答

谁遇到过win的 完成端口 GetQueuedCompletionStatus 函数返回121错误的问题?

  •  
  •   46fo · Jan 12, 2014 · 5734 views
    This topic created in 4595 days ago, the information mentioned may be changed or developed.
    9 replies    1970-01-01 08:00:00 +08:00
    timonwong
        1
    timonwong  
       Jan 12, 2014
    Connecion timeout?
    46fo
        2
    46fo  
    OP
       Jan 12, 2014
    @timonwong BOOL bReturn = GetQueuedCompletionStatus(
    pIOCPModel->m_hIOCompletionPort,
    &dwBytesTransfered,
    (PULONG_PTR)&pSocketContext,
    &pOverlapped,
    INFINITE); 我可以是无线等待的啊
    timonwong
        3
    timonwong  
       Jan 12, 2014
    @xdeng
    这个不管GetQueuedCompletionStatus,而是之前的调用,比如ConnectEx、AcceptEx等等。
    46fo
        4
    46fo  
    OP
       Jan 12, 2014
    @timonwong 不是 啊 我是在 GetQueuedCompletionStatus 失败的 然后获取到的错误值 是 121
    timonwong
        5
    timonwong  
       Jan 12, 2014   ❤️ 1
    @xdeng
    我知道,这个就是完成端口的含义,那些ConnectEx, AcceptEx并没有“完成”
    46fo
        6
    46fo  
    OP
       Jan 12, 2014
    @timonwong 能详解 一下吗? 我被这个问题困死了
    46fo
        7
    46fo  
    OP
       Jan 12, 2014
    @timonwong 遇到121该怎么处理 是跳过还是失败跳出?
    timonwong
        8
    timonwong  
       Jan 13, 2014   ❤️ 1
    @xdeng
    看场景了,这个如果你是服务器端一般就忽略, continue(121: ERROR_SEM_TIMEOUT,一般对应三次握手失败,这种情况跳出合适?),客户端可能需要重新连接(仍然看场景)。
    46fo
        9
    46fo  
    OP
       Jan 13, 2014
    @timonwong 非常感谢 我试试
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1575 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 16:40 · PVG 00:40 · LAX 09:40 · JFK 12:40
    ♥ Do have faith in what you're doing.