 |
Changeset 3841
- Timestamp:
- 08/03/08 15:15:04
(4 months ago)
- Author:
- kris
- Message:
fixes #1141 :: IConduit should be reexamined
Applied patch from Schveiguy. Thanks for providing that ... now you can change your ThreadConduit? :)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r3687 |
r3841 |
|
| 22 | 22 | |
|---|
| 23 | 23 | Conduit abstract base-class, implementing interface IConduit. |
|---|
| 24 | | Only the conduit-specific read(), write(), fileHandle() and |
|---|
| | 24 | Only the conduit-specific read(), write(), and |
|---|
| 25 | 25 | bufferSize() need to be implemented for a concrete conduit |
|---|
| 26 | 26 | implementation. See FileConduit for an example. |
|---|
| … | … | |
| 39 | 39 | *******************************************************************************/ |
|---|
| 40 | 40 | |
|---|
| 41 | | class Conduit : IConduit, ISelectable |
|---|
| | 41 | class Conduit : IConduit |
|---|
| 42 | 42 | { |
|---|
| 43 | 43 | /*********************************************************************** |
|---|
| … | … | |
| 56 | 56 | |
|---|
| 57 | 57 | abstract uint bufferSize (); |
|---|
| 58 | | |
|---|
| 59 | | /*********************************************************************** |
|---|
| 60 | | |
|---|
| 61 | | Models a handle-oriented device. We need to revisit this |
|---|
| 62 | | |
|---|
| 63 | | TODO: figure out how to avoid exposing this in the general |
|---|
| 64 | | case |
|---|
| 65 | | |
|---|
| 66 | | ***********************************************************************/ |
|---|
| 67 | | |
|---|
| 68 | | abstract Handle fileHandle (); |
|---|
| 69 | 58 | |
|---|
| 70 | 59 | /*********************************************************************** |
|---|
| … | … | |
| 459 | 448 | |
|---|
| 460 | 449 | |
|---|
| | 450 | |
|---|
| r3643 |
r3841 |
|
| 27 | 27 | *******************************************************************************/ |
|---|
| 28 | 28 | |
|---|
| 29 | | class DeviceConduit : Conduit |
|---|
| | 29 | class DeviceConduit : Conduit, ISelectable |
|---|
| 30 | 30 | { |
|---|
| 31 | 31 | /// expose in superclass definition also |
|---|
| … | … | |
| 92 | 92 | ***************************************************************/ |
|---|
| 93 | 93 | |
|---|
| 94 | | final override Handle fileHandle () |
|---|
| | 94 | final Handle fileHandle () |
|---|
| 95 | 95 | { |
|---|
| 96 | 96 | return cast(Handle) handle; |
|---|
| … | … | |
| 241 | 241 | |
|---|
| 242 | 242 | |
|---|
| | 243 | |
|---|
| r3614 |
r3841 |
|
| 30 | 30 | *******************************************************************************/ |
|---|
| 31 | 31 | |
|---|
| 32 | | class SocketConduit : Conduit |
|---|
| | 32 | class SocketConduit : Conduit, ISelectable |
|---|
| 33 | 33 | { |
|---|
| 34 | 34 | private timeval tv; |
|---|
| … | … | |
| 117 | 117 | ***********************************************************************/ |
|---|
| 118 | 118 | |
|---|
| 119 | | override Handle fileHandle () |
|---|
| | 119 | Handle fileHandle () |
|---|
| 120 | 120 | { |
|---|
| 121 | 121 | return cast(Handle) socket_.fileHandle; |
|---|
| … | … | |
| 364 | 364 | } |
|---|
| 365 | 365 | |
|---|
| | 366 | |
|---|
Download in other formats:
|
 |
 |
|
 |
Copyright © 2006-2008 Tango. All Rights Reserved. | Page Width:
Static or
Dynamic