Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-libraries
Commits
4e7341a7
Commit
4e7341a7
authored
Dec 01, 1999
by
Peter Achten
Browse files
(PA) improved module structure
parent
4d058d8c
Changes
6
Hide whitespace changes
Inline
Side-by-side
ObjectIO/Tcp/StdChannelEnv.dcl
0 → 100644
View file @
4e7341a7
definition
module
StdChannelEnv
// ********************************************************************************
// Clean Standard Object I/O library, version 1.2
//
// StdChannelEnv defines instances of ChannelEnv for PSt and IOSt.
// ********************************************************************************
import
channelenv
import
StdPStClass
from
iostate
import
PSt
,
IOSt
instance
ChannelEnv
(
PSt
.
l
)
instance
ChannelEnv
(
IOSt
.
l
)
ObjectIO/Tcp/StdChannelEnv.icl
0 → 100644
View file @
4e7341a7
implementation
module
StdChannelEnv
import
StdBool
,
StdFunc
,
StdList
,
StdMisc
,
StdTuple
import
channelenv
import
commondef
,
iostate
,
receiverid
,
StdPStClass
,
StdReceiver
/* PSt is also an environment instance of the class ChannelEnv */
instance
ChannelEnv
(
PSt
.
l
)
where
channelEnvKind
env
=
(
PST
,
env
)
mb_close_inet_receiver_without_id
reallyDoIt
id_pair
pSt
=:{
io
}
=
{
pSt
&
io
=
mb_close_inet_receiver_without_id
True
id_pair
io
}
/* IOSt is also an environment instance of the class ChannelEnv */
instance
ChannelEnv
(
IOSt
.
l
)
where
channelEnvKind
env
=
(
IOST
,
env
)
mb_close_inet_receiver_without_id
False
_
ioState
=
ioState
mb_close_inet_receiver_without_id
True
id_pair
ioState
#!
(
closed
,
ioState
)
=
IOStClosed
ioState
|
closed
=
ioState
#
(
found
,
receivers
,
ioState
)
=
IOStGetDevice
ReceiverDevice
ioState
|
not
found
// PA: guard added
=
ioState
#
rsHs
=
(
ReceiverSystemStateGetReceiverHandles
receivers
).
rReceivers
(
found
,
rsH
,
rsHs
)
=
Remove
(
inetReceiverStateIdentified1
id_pair
)
undef
rsHs
#
ioState
=
IOStSetDevice
(
ReceiverSystemState
{
rReceivers
=
rsHs
})
ioState
|
not
found
=
ioState
|
otherwise
#
id
=
rsH
.
rHandle
.
rId
(
idtable
,
ioState
)
=
IOStGetIdTable
ioState
ioState
=
IOStSetIdTable
(
snd
(
removeIdFromIdTable
id
idtable
))
ioState
ioState
=
unbindRId
id
ioState
ioState
=
IOStSetRcvDisabled
True
ioState
// MW11++
connectedIds
=
rsH
.
rHandle
.
rConnected
ioState
=
seq
(
map
closeReceiver
connectedIds
)
ioState
inetInfo
=
rsH
.
rHandle
.
rInetInfo
(_,_,_,
closeFun
)
=
fromJust
inetInfo
ioState
=
appIOToolbox
closeFun
ioState
=
ioState
inetReceiverStateIdentified1
::
!(!
EndpointRef`
,
!
InetReceiverCategory`
)
!(
ReceiverStateHandle
.
ps
)
->
Bool
inetReceiverStateIdentified1
x
{
rHandle
}
=
inetReceiverIdentified
x
rHandle
ObjectIO/Tcp/StdChannels.dcl
View file @
4e7341a7
...
...
@@ -11,7 +11,7 @@ from StdOverloaded import ==, toString
from
channelenv
import
ChannelEnv
instance
ChannelEnv
World
// other instances are IOSt & PSt (see Std
PSt
)
// other instances are IOSt & PSt (see Std
ChannelEnv
)
///////////////////////////////// receive channels /////////////////////////////////
...
...
ObjectIO/Tcp/StdEventTCP.icl
View file @
4e7341a7
...
...
@@ -3,10 +3,10 @@ implementation module StdEventTCP
// Clean Standard Object I/O library, version 1.2
import
StdEnv
import
StdChannels
,
StdTCPDef
,
StdTCPChannels
import
StdChannelEnv
,
StdChannels
,
StdTCPDef
,
StdTCPChannels
import
StdReceiver
import
StdPSt
import
tcp
,
ostcp
,
channelenv
,
tcp_bytestreams
import
StdPSt
,
StdPStClass
import
tcp
,
ostcp
,
tcp_bytestreams
import
commondef
,
receiverid
,
receiverdevice
,
receiverdefaccess
,
receiveraccess
//import intrface
...
...
ObjectIO/Tcp/StdStringChannels.icl
View file @
4e7341a7
...
...
@@ -3,7 +3,7 @@ implementation module StdStringChannels
// Clean Standard Object I/O library, version 1.2
import
StdEnv
import
StdPSt
import
StdPSt
,
StdPStClass
import
StdChannels
,
StdTCPDef
,
StdTCPChannels
,
StdReceiver
,
StdEventTCP
import
receiverdefaccess
...
...
ObjectIO/Tcp/StdTCP.dcl
View file @
4e7341a7
definition
module
StdTCP
import
StdChannels
,
import
StdChannelEnv
,
StdChannels
,
StdTCPChannels
,
StdEventTCP
,
StdStringChannels
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment