Search code examples
tcpwinsockateasy

Using Winsock (TCP/IP) functions in ATEASY development enviroment


I am using WsReceive() function of the ATEasy framework and wanted to ask what is the meaning of the values "aioDefault and aioDisableWsReceiveEarlyReturn" of "enMode" parameter?


Solution

  • I found this in the ATEASY documentation:

    If enMode, input receive mode includes aioDisableWsReceiveEarlyReturn, it prevents WsReceive from an "early return" when there is a momentary interruption in the data being received.

    And this from the online help of ateasy (By a tip of an expert from the ateasy forum) :

    If sEos parameter is an empty string and aioDisableWsReceiveEarlyReturn mode flag is not used (default case), the function will return immediately if characters are found in the input buffer, and the timeout will be ignored. Using the aioDisableWsReceiveEarlyReturn flag will ensure that the function will return only if the timeout is reached or all lBytes characters were received.