diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-10-04 10:46:46 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-10-04 10:46:46 +0000 |
commit | 86f9fbefa58d91e151190c969216c751573bc664 (patch) | |
tree | 4e13de2666bfb063964877986dc7b8d310714483 /src/client.cpp | |
parent | b3eef5b0b82c20a9f11868ba376f6bb2d94faae4 (diff) | |
download | libbu++-86f9fbefa58d91e151190c969216c751573bc664.tar.gz libbu++-86f9fbefa58d91e151190c969216c751573bc664.tar.bz2 libbu++-86f9fbefa58d91e151190c969216c751573bc664.tar.xz libbu++-86f9fbefa58d91e151190c969216c751573bc664.zip |
Discovered that the Bu::Client::disconnect() function didn't do anything. That
has been fixed, it now safely disconnects after emptying the Client's outgoing
buffer.
Added some more helpers to Bu::FString.
Added the beginings of ProtocolHttp using a new method for processing protocols
that's based more strongly on an NFA state machine, this makes sense, but I
never had the desire to actually try implementing it before. It's working
pretty well.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp index d416700..19d2778 100644 --- a/src/client.cpp +++ b/src/client.cpp | |||
@@ -11,7 +11,8 @@ | |||
11 | Bu::Client::Client( Bu::Socket *pSocket ) : | 11 | Bu::Client::Client( Bu::Socket *pSocket ) : |
12 | pSocket( pSocket ), | 12 | pSocket( pSocket ), |
13 | pProto( NULL ), | 13 | pProto( NULL ), |
14 | nRBOffset( 0 ) | 14 | nRBOffset( 0 ), |
15 | bWantsDisconnect( false ) | ||
15 | { | 16 | { |
16 | } | 17 | } |
17 | 18 | ||
@@ -205,5 +206,15 @@ const Bu::Socket *Bu::Client::getSocket() const | |||
205 | 206 | ||
206 | void Bu::Client::disconnect() | 207 | void Bu::Client::disconnect() |
207 | { | 208 | { |
209 | bWantsDisconnect = true; | ||
208 | } | 210 | } |
209 | 211 | ||
212 | bool Bu::Client::wantsDisconnect() | ||
213 | { | ||
214 | return bWantsDisconnect; | ||
215 | } | ||
216 | |||
217 | void Bu::Client::close() | ||
218 | { | ||
219 | pSocket->close(); | ||
220 | } | ||