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-compiler-and-rts
stdenv
Commits
d78c66d9
Commit
d78c66d9
authored
Dec 01, 1999
by
Peter Achten
Browse files
no message
parent
4c7e928d
Changes
6
Hide whitespace changes
Inline
Side-by-side
ObjectIO/Tcp/StdChannelEnv.dcl
deleted
100644 → 0
View file @
4c7e928d
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
deleted
100644 → 0
View file @
4c7e928d
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 @
d78c66d9
...
...
@@ -9,9 +9,10 @@ definition module StdChannels
from
StdMaybe
import
Maybe
from
StdOverloaded
import
==,
toString
from
channelenv
import
ChannelEnv
from
iostate
import
PSt
,
IOSt
import
StdPStClass
instance
ChannelEnv
World
// other instances are IOSt & PSt (see StdChannelEnv)
instance
ChannelEnv
World
,
(
PSt
.
l
),
(
IOSt
.
l
)
///////////////////////////////// receive channels /////////////////////////////////
...
...
ObjectIO/Tcp/StdChannels.icl
View file @
d78c66d9
...
...
@@ -8,6 +8,7 @@ import StdMaybe
import
StdIOCommon
,
StdTime
import
channelenv
import
id
import
commondef
,
iostate
,
receiverid
,
StdPStClass
,
StdReceiver
instance
ChannelEnv
World
where
...
...
@@ -15,6 +16,52 @@ instance ChannelEnv World
mb_close_inet_receiver_without_id
_
_
world
=
world
/* 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
///////////////////////////////// receive channels /////////////////////////////////
class
Receive
ch
...
...
ObjectIO/Tcp/StdEventTCP.icl
View file @
d78c66d9
...
...
@@ -3,7 +3,7 @@ implementation module StdEventTCP
// Clean Standard Object I/O library, version 1.2
import
StdEnv
import
StdChannelEnv
,
StdChannels
,
StdTCPDef
,
StdTCPChannels
import
/*
StdChannelEnv,
*/
StdChannels
,
StdTCPDef
,
StdTCPChannels
import
StdReceiver
import
StdPSt
,
StdPStClass
import
tcp
,
ostcp
,
tcp_bytestreams
...
...
ObjectIO/Tcp/StdTCP.dcl
View file @
d78c66d9
definition
module
StdTCP
import
StdChannelEnv
,
StdChannels
,
import
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