summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2011-11-09 02:18:25 +0200
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2011-11-09 02:18:25 +0200
commitfe4520fc09dca52c158437f5621f5909d7d6974f (patch)
treeabdd78914024b78777e67007607a58780f067158 /server
parent4a50cd7f46234ed70ba67665def4a4953be5d310 (diff)
speed handling in protocol
Diffstat (limited to 'server')
-rw-r--r--server/proxy_ui_server.workspace2
-rw-r--r--server/server/config.h3
-rw-r--r--server/server/main.cpp7
3 files changed, 11 insertions, 1 deletions
diff --git a/server/proxy_ui_server.workspace b/server/proxy_ui_server.workspace
index 30e9c53..7eda2a4 100644
--- a/server/proxy_ui_server.workspace
+++ b/server/proxy_ui_server.workspace
@@ -13,6 +13,8 @@
<![CDATA[
+
+
]]>
</Environment>
</CodeLite_Workspace>
diff --git a/server/server/config.h b/server/server/config.h
index 5d2eb83..b5fedd0 100644
--- a/server/server/config.h
+++ b/server/server/config.h
@@ -25,8 +25,9 @@ struct proxy_entry
struct static_proxy_entry
{
int port, position;
+ uint64_t speed;
std::string host, login, password, label;
- static_proxy_entry(): port(0), position(0)
+ static_proxy_entry(): port(0), position(0), speed(0)
{}
static_proxy_entry(std::string login_, std::string password_, std::string host_, int port_, std::string label_, int position_)
{
diff --git a/server/server/main.cpp b/server/server/main.cpp
index 0f565af..52d7102 100644
--- a/server/server/main.cpp
+++ b/server/server/main.cpp
@@ -330,6 +330,13 @@ void session::proto_parser(std::vector<byte>& data)
data.push_back(pos[i]);
}
data.push_back(' ');
+ {
+ char speed[10];
+ snprintf(speed, 10, "%lu", it->speed);
+ int len = strlen(speed);
+ for(int i = 0; i < len; ++i)
+ data.push_back(speed[i]);
+ }
data.push_back('0'); //add speed here
data.push_back(';');
}