diff options
author | Nate Goergen <nate.goergen.gitlab1@mile10.com> | 2015-03-08 00:27:52 -0600 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2015-04-02 15:38:57 -0700 |
commit | 0d018254de818037007ead4c4c431284d58bc515 (patch) | |
tree | e68789e724ede82bbe401780e4e2cd3edc2962f3 /gnuradio-runtime/lib/controlport | |
parent | 44466b0037ef4fead18c8a28e9cc198120ce23e8 (diff) |
controlport: cleanup
- removal of unused strings 'controlport name' and 'endpoint name'.
- Moved default_buffer_size constant from server_template, which is
where boot specific constant are currently defined.
Diffstat (limited to 'gnuradio-runtime/lib/controlport')
-rw-r--r-- | gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc b/gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc index 2a31a4f67a..b6d113ba2a 100644 --- a/gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc +++ b/gnuradio-runtime/lib/controlport/thrift/rpcserver_booter_thrift.cc @@ -27,8 +27,12 @@ namespace { static const char* const CONTROL_PORT_CLASS("thrift"); - static const char* const CONTROL_PORT_NAME("ControlPort"); - static const char* const ENDPOINT_NAME("gnuradio"); + static const unsigned int ETHERNET_HEADER_SIZE(14); + static const unsigned int IP_HEADER_SIZE(20); + static const unsigned int TCP_HEADER_SIZE(32); + static const unsigned int ETHERNET_TYPICAL_MTU(1500); + static const unsigned int ALRIGHT_DEFAULT_BUFFER_SIZE( + ETHERNET_TYPICAL_MTU - ETHERNET_HEADER_SIZE - IP_HEADER_SIZE - TCP_HEADER_SIZE); }; /*! @@ -39,8 +43,7 @@ rpcserver_booter_thrift::rpcserver_booter_thrift() : thrift_server_template<rpcserver_base, rpcserver_thrift, rpcserver_booter_thrift, - boost::shared_ptr<GNURadio::ControlPortIf> > - (this, std::string(CONTROL_PORT_NAME), std::string(ENDPOINT_NAME)), + boost::shared_ptr<GNURadio::ControlPortIf> >(this), d_type(std::string(CONTROL_PORT_CLASS)) {;} @@ -83,6 +86,10 @@ const unsigned int thrift_application_base<rpcserver_base, rpcserver_booter_thri template<class rpcserver_base, class rpcserver_booter_thrift> const unsigned int thrift_application_base<rpcserver_base, rpcserver_booter_thrift>::d_default_num_thrift_threads(10U); +template<class rpcserver_base, class rpcserver_booter_thrift> +const unsigned int thrift_application_base<rpcserver_base, rpcserver_booter_thrift>::d_default_thrift_buffer_size( + ALRIGHT_DEFAULT_BUFFER_SIZE); + template<class rpcserver_base, class rpcserver_booter_thrift> std::auto_ptr<thrift_application_base_impl> thrift_application_base<rpcserver_base, rpcserver_booter_thrift>::p_impl( |