You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2020/12/03 01:21:31 UTC

[trafficserver] branch master updated: Cleanup: Get rid of NetVConnection::outstanding() (#7366)

This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 95db097  Cleanup: Get rid of NetVConnection::outstanding() (#7366)
95db097 is described below

commit 95db097d39bb09e1646def75baccc930bbd554a1
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Thu Dec 3 10:21:14 2020 +0900

    Cleanup: Get rid of NetVConnection::outstanding() (#7366)
---
 iocore/net/I_NetVConnection.h     |  8 --------
 iocore/net/P_UnixNetVConnection.h |  1 -
 iocore/net/UnixNetVConnection.cc  | 13 -------------
 3 files changed, 22 deletions(-)

diff --git a/iocore/net/I_NetVConnection.h b/iocore/net/I_NetVConnection.h
index c2aa346..88d8ec6 100644
--- a/iocore/net/I_NetVConnection.h
+++ b/iocore/net/I_NetVConnection.h
@@ -357,14 +357,6 @@ struct NetVCOptions {
 class NetVConnection : public VConnection, public PluginUserArgs<TS_USER_ARGS_VCONN>
 {
 public:
-  // How many bytes have been queued to the OS for sending by haven't been sent yet
-  // Not all platforms support this, and if they don't we'll return -1 for them
-  virtual int64_t
-  outstanding()
-  {
-    return -1;
-  };
-
   /**
      Initiates read. Thread safe, may be called when not handling
      an event from the NetVConnection, or the NetVConnection creation
diff --git a/iocore/net/P_UnixNetVConnection.h b/iocore/net/P_UnixNetVConnection.h
index 0361fb0..e636814 100644
--- a/iocore/net/P_UnixNetVConnection.h
+++ b/iocore/net/P_UnixNetVConnection.h
@@ -107,7 +107,6 @@ enum tcp_congestion_control_t { CLIENT_SIDE, SERVER_SIDE };
 class UnixNetVConnection : public NetVConnection, public NetEvent
 {
 public:
-  int64_t outstanding() override;
   VIO *do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf) override;
   VIO *do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *buf, bool owner = false) override;
 
diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc
index 0d5ad00..3aac686 100644
--- a/iocore/net/UnixNetVConnection.cc
+++ b/iocore/net/UnixNetVConnection.cc
@@ -571,19 +571,6 @@ UnixNetVConnection::get_data(int id, void *data)
   }
 }
 
-int64_t
-UnixNetVConnection::outstanding()
-{
-  int n;
-  int ret = ioctl(this->get_socket(), TIOCOUTQ, &n);
-  // if there was an error (such as ioctl doesn't support this call on this platform) then
-  // we return -1
-  if (ret == -1) {
-    return ret;
-  }
-  return n;
-}
-
 VIO *
 UnixNetVConnection::do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf)
 {