diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-04-26 15:06:49 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-04-26 15:06:49 +0000 |
commit | 530014a3cce53e86dce8917e98a4e86d02f176aa (patch) | |
tree | c667c996fb91692b101f75296206b8420f19bf73 /src/socket.cpp | |
parent | 066282ae6de25cf92780dbdaa2fd70a033e95659 (diff) | |
download | libbu++-530014a3cce53e86dce8917e98a4e86d02f176aa.tar.gz libbu++-530014a3cce53e86dce8917e98a4e86d02f176aa.tar.bz2 libbu++-530014a3cce53e86dce8917e98a4e86d02f176aa.tar.xz libbu++-530014a3cce53e86dce8917e98a4e86d02f176aa.zip |
Merged Ito and put it in the BU namespace. I should probably clean up the
formatting on the comments, some of the lines wrap, but I'm not too worried
about it right now. I also fixed up the doxygen config and build.conf files
so that everything is building nice and smooth now.
Diffstat (limited to 'src/socket.cpp')
-rw-r--r-- | src/socket.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/socket.cpp b/src/socket.cpp index c4f914b..455b5c8 100644 --- a/src/socket.cpp +++ b/src/socket.cpp | |||
@@ -118,6 +118,7 @@ void Bu::Socket::close() | |||
118 | //} | 118 | //} |
119 | } | 119 | } |
120 | 120 | ||
121 | /* | ||
121 | void Bu::Socket::read() | 122 | void Bu::Socket::read() |
122 | { | 123 | { |
123 | char buffer[RBS]; | 124 | char buffer[RBS]; |
@@ -132,7 +133,6 @@ void Bu::Socket::read() | |||
132 | if( nbytes < 0 && errno != 0 && errno != EAGAIN ) | 133 | if( nbytes < 0 && errno != 0 && errno != EAGAIN ) |
133 | { | 134 | { |
134 | //printf("errno: %d, %s\n", errno, strerror( errno ) ); | 135 | //printf("errno: %d, %s\n", errno, strerror( errno ) ); |
135 | /* Read error. */ | ||
136 | //perror("readInput"); | 136 | //perror("readInput"); |
137 | throw ConnectionException( | 137 | throw ConnectionException( |
138 | excodeReadError, | 138 | excodeReadError, |
@@ -146,15 +146,13 @@ void Bu::Socket::read() | |||
146 | break; | 146 | break; |
147 | nTotalRead += nbytes; | 147 | nTotalRead += nbytes; |
148 | sReadBuf.append( buffer, nbytes ); | 148 | sReadBuf.append( buffer, nbytes ); |
149 | /* Data read. */ | ||
150 | if( nbytes < RBS ) | 149 | if( nbytes < RBS ) |
151 | { | 150 | { |
152 | break; | 151 | break; |
153 | } | 152 | } |
154 | 153 | ||
155 | /* New test, if data is divisible by RBS bytes on some libs the | 154 | // New test, if data is divisible by RBS bytes on some libs the |
156 | * read could block, this keeps it from happening. | 155 | // read could block, this keeps it from happening. |
157 | */ | ||
158 | { | 156 | { |
159 | fd_set rfds; | 157 | fd_set rfds; |
160 | FD_ZERO(&rfds); | 158 | FD_ZERO(&rfds); |
@@ -171,13 +169,7 @@ void Bu::Socket::read() | |||
171 | } | 169 | } |
172 | } | 170 | } |
173 | } | 171 | } |
174 | 172 | }*/ | |
175 | /* | ||
176 | if( pProtocol != NULL && nTotalRead > 0 ) | ||
177 | { | ||
178 | pProtocol->onNewData(); | ||
179 | }*/ | ||
180 | } | ||
181 | 173 | ||
182 | size_t Bu::Socket::read( void *pBuf, size_t nBytes ) | 174 | size_t Bu::Socket::read( void *pBuf, size_t nBytes ) |
183 | { | 175 | { |