Modify ↓
Opened 12 years ago
Closed 6 years ago
#2670 closed Bug (Works For Me)
TCP connection lost on blocking functions.
| Reported by: | FireFox | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.11.3 | Severity: | None |
| Keywords: | Cc: |
Description
The connection seems to be closed when there's a blocking function called on the other side like MsgBox, FileOpenDialog.
Attachments (2)
Change History (4)
by , 12 years ago
| Attachment: | server_#2670.au3 added |
|---|
by , 12 years ago
| Attachment: | client_#2670.au3 added |
|---|
comment:2 by , 6 years ago
| Resolution: | → Works For Me |
|---|---|
| Status: | new → closed |
Hi I think the problem is closed just try the TCPSend/ TCPRecv second example using a big file
Note:
See TracTickets
for help on using tickets.

I made a tcp server in c++ and I discovered if the TCPRecv function returns an error it does NOT mean the connection is lost.
But why? The connection is still there so there is no reason for the function to return an error, otherwise it should return an error when nothing is received.
It would be nice to a dev to clarify me what is happening and how to check if the connection is still alive in case an error is returned (what is the best way at least), so I can update the help file for the tcp functions.
Also, I would like to point out that in the attachments I provided the tcprecv function returns an error code of -1 and the call to WSAGetError returns 0.