|
|
Choosing A Webhost: |
CVS update of carob (include/DriverSocket.hpp src/DriverSocket.cpp): msg#00076db.carob.cvs
Date: Thursday, February 23, 2006 @ 12:09:56 Author: zsolt Path: /cvsroot/carob/carob Modified: include/DriverSocket.hpp (1.12 -> 1.13) src/DriverSocket.cpp (1.16 -> 1.17) fragment long strings into STRING_CHUNK_SIZE and send it to the controller this way. Reference: CAROB-67 --------------------------+ include/DriverSocket.hpp | 2 ++ src/DriverSocket.cpp | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) Index: carob/include/DriverSocket.hpp diff -u carob/include/DriverSocket.hpp:1.12 carob/include/DriverSocket.hpp:1.13 --- carob/include/DriverSocket.hpp:1.12 Wed Jan 25 17:01:59 2006 +++ carob/include/DriverSocket.hpp Thu Feb 23 12:09:56 2006 @@ -26,6 +26,8 @@ namespace CarobNS { +const int STRING_CHUNK_SIZE = 64000/3; + /** * Higher level class for socket. * Defines handy methods to read/write to/from a controller following Index: carob/src/DriverSocket.cpp diff -u carob/src/DriverSocket.cpp:1.16 carob/src/DriverSocket.cpp:1.17 --- carob/src/DriverSocket.cpp:1.16 Wed Feb 15 11:03:42 2006 +++ carob/src/DriverSocket.cpp Thu Feb 23 12:09:56 2006 @@ -44,12 +44,10 @@ *this<<true; size_t strLen = s.size(); *this<<static_cast<int32_t>(strLen); - size_t totalWritten = 0; // FIXME: catch CodecException here - while (totalWritten < strLen) - { - totalWritten += writeJavaUTF(s); - } + for (size_t idx=0; idx < strLen; idx+=STRING_CHUNK_SIZE) + writeJavaUTF(s.substr(idx, STRING_CHUNK_SIZE)); + return *this; }
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS update of libmysequoia/src (CarobStmt.cpp), zsolt-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
|---|---|
| Next by Date: | CVS update of libmysequoia/src (CarobMySQL.cpp MySQLAPI.cpp), zsolt-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Previous by Thread: | CVS update of libmysequoia (5 files), zsolt-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Next by Thread: | CVS update of carob (include/DriverSocket.hpp src/DriverSocket.cpp), gilles-Tt5JLJuBijYiZlD9aYmxOGD2FQJk+8+b |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home
| advertise | OSDir is
an inevitable website.
|