Permalink
Browse files

Merge commit 'refs/pull/488/head' of github.com:znc/znc

  • Loading branch information...
2 parents 62cd474 + f33212b commit bdc3bfe918871ab940f1eca5da0046bea10a22d1 @DarthGandalf DarthGandalf committed Feb 10, 2014
Showing with 10 additions and 0 deletions.
  1. +4 −0 modules/data/listsockets/tmpl/index.tmpl
  2. +6 −0 modules/listsockets.cpp
@@ -9,6 +9,8 @@
<td>SSL</td>
<td>Local</td>
<td>Remote</td>
+ <td>Data In</td>
+ <td>Data Out</td>
</tr>
</thead>
<tbody>
@@ -20,6 +22,8 @@
<td><? VAR SSL ?></td>
<td><? VAR Local ?></td>
<td><? VAR Remote ?></td>
+ <td><? VAR In ?></td>
+ <td><? VAR Out ?></td>
</tr>
<? ENDLOOP ?>
</tbody>
View
@@ -118,6 +118,8 @@ class CListSockets : public CModule {
Row["SSL"] = pSocket->GetSSL() ? "Yes" : "No";
Row["Local"] = GetLocalHost(pSocket, true);
Row["Remote"] = GetRemoteHost(pSocket, true);
+ Row["In"] = CString::ToByteStr(pSocket->GetBytesRead());
+ Row["Out"] = CString::ToByteStr(pSocket->GetBytesWritten());
}
return true;
@@ -222,6 +224,8 @@ class CListSockets : public CModule {
#endif
Table.AddColumn("Local");
Table.AddColumn("Remote");
+ Table.AddColumn("In");
+ Table.AddColumn("Out");
while (!socks.empty()) {
Csock* pSocket = socks.top().GetSock();
@@ -238,6 +242,8 @@ class CListSockets : public CModule {
Table.SetCell("Local", GetLocalHost(pSocket, bShowHosts));
Table.SetCell("Remote", GetRemoteHost(pSocket, bShowHosts));
+ Table.SetCell("In", CString::ToByteStr(pSocket->GetBytesRead()));
+ Table.SetCell("Out", CString::ToByteStr(pSocket->GetBytesWritten()));
}
PutModule(Table);

0 comments on commit bdc3bfe

Please sign in to comment.