message: Improve codes of swConnection_(recv/send).
diff: @@ -140,7 +140,9 @@ int swSSL_sendfile(swConnection *conn, int fd, off_t *offset, size_t size);
  static sw_inline ssize_t swConnection_recv(swConnection *conn, void *__buf, size_t __n, int __flags)
  {
  ssize_t total_bytes = 0;
  - _recv:
  +
  + do
  + {
  #ifdef SW_USE_OPENSSL
  if (conn->ssl)
  {
  @@ -171,11 +173,8 @@ static sw_inline ssize_t swConnection_recv(swConnection *conn, void *__buf, size
  {
  total_bytes = recv(conn->fd, __buf, __n, __flags);
  }
  -
  - if (total_bytes < 0 && errno == EINTR)
  - {
  - goto _recv;
  }
  + while (total_bytes < 0 && errno == EINTR);
  #ifdef SW_DEBUG
  if (total_bytes > 0)
  @@ -195,30 +194,22 @@ static sw_inline ssize_t swConnection_recv(swConnection *conn, void *__buf, size
  static sw_inline ssize_t swConnection_send(swConnection *conn, void *__buf, size_t __n, int __flags)
  {
  ssize_t retval;
  - _send:
  +
  + do
  + {
  #ifdef SW_USE_OPENSSL
  if (conn->ssl)
  {
  retval = swSSL_send(conn, __buf, __n);
  }
  else
  - {
  - retval = send(conn->fd, __buf, __n, __flags);
  - }
  -#else
  - retval = send(conn->fd, __buf, __n, __flags);
  #endif
  -
  - if (retval < 0 && errno == EINTR)
  {
  - goto _send;
  + retval = send(conn->fd, __buf, __n, __flags);
  }
  - else
  - {
  - goto _return;
  }
  + while (retval < 0 && errno == EINTR);
  - _return:
  #ifdef SW_DEBUG
  if (retval > 0)
  {
  @@ -226,6 +217,8 @@ static sw_inline ssize_t swConnection_send(swConnection *conn, void *__buf, size
  }
  #endif
  + swTraceLog(SW_TRACE_SOCKET, "send %ld/%ld bytes, errno=%d", retval, __n, errno);
  +
  return retval;
  }
  