FAQ
Hi,

In a scenario where client connect to the server, send a line of message,
  read the response and send "QUIT" and wait for the response, we end-up
with WSAECONNABORTED under Windows. The server send response to the line of
message and close the connection without reading 'QUIT' and sending the
response. In Unix, I get io.EOF for the half-close connection and on
Windows, this end up with WSAECONNABORTED. Is this the case always with
half-close under Windows while trying to read from the socket? Is there a
suggested way to check this error uniformly under golang? Or should I
explicitly match for the error string under Windows?

-Karthik

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Brainman at Feb 22, 2015 at 10:53 pm
    Maybe file an issue https://golang.org/issue/new. Can you provide small
    program to demonstrate the problem? (Both client and server)

    If it is what I think it is, then I do not think WSAECONNABORTED should be
    treated as io.EOF. But I agree Go should behave similar on Unix and WIndows.

    Also you should not need to match error strings to
    recognize WSAECONNABORTED. In fact you should not - the error message will
    be in local language. You should just check if returned error
    is WSAECONNABORTED.

    Alex
    On Saturday, 21 February 2015 05:37:05 UTC+11, Karthik Rajagopalan wrote:

    Hi,

    In a scenario where client connect to the server, send a line of message,
    read the response and send "QUIT" and wait for the response, we end-up
    with WSAECONNABORTED under Windows. The server send response to the line of
    message and close the connection without reading 'QUIT' and sending the
    response. In Unix, I get io.EOF for the half-close connection and on
    Windows, this end up with WSAECONNABORTED. Is this the case always with
    half-close under Windows while trying to read from the socket? Is there a
    suggested way to check this error uniformly under golang? Or should I
    explicitly match for the error string under Windows?

    -Karthik
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedFeb 20, '15 at 6:37p
activeFeb 22, '15 at 10:53p
posts2
users2
websitegolang.org

2 users in discussion

Karthik Rajagopalan: 1 post Brainman: 1 post

People

Translate

site design / logo © 2021 Grokbase