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
fb773dae
Verified
Commit
fb773dae
authored
Sep 05, 2020
by
Camil Staps
Browse files
Update TCPIP/ObjectIO for strict maybes in TCPIP library
parent
0987b0f8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Libraries/ObjectIO/ObjectIO/OS Linux/osevent.icl
View file @
fb773dae
implementation
module
osevent
import
StdBool
,
StdList
,
StdMisc
,
StdTuple
import
StdBool
,
StdList
,
StdMaybe
,
StdMisc
,
StdTuple
import
clCrossCall_12
,
ostime
,
ostoolbox
,
ostypes
from
commondef
import
hdtl
,
fatalError
from
StdMaybe
import
::
Maybe
(..)
...
...
Libraries/ObjectIO/ObjectIO/OS Mac Carbon/osevent.icl
View file @
fb773dae
implementation
module
osevent
import
StdInt
,
StdBool
,
StdList
,
StdTuple
import
StdInt
,
StdBool
,
StdList
,
StdMaybe
,
StdTuple
import
events
,
desk
,
pointer
import
StdClass
,
StdMisc
import
code
from
"cTCP."
...
...
Libraries/TCPIP/ObjectIO/StdEventTCP.icl
View file @
fb773dae
...
...
@@ -81,11 +81,11 @@ instance Receivers TCP_ListenerReceiver where
=
open_RChan_or_Listener
close_listener
ls
id
rAttributes
endpointRef
0
(
handleConnectRequest
f
)
ListenerReceiver
pSt
where
handleConnectRequest
f
(
IE_CONNECTREQUEST
,
endpointRef
,_)
(
ls
,
ps
=:{
io
})
#
(_,
mbHostDuplexChan
,_,
io
)
=
receive_MT
(
Just
0
)
(
pack_tcplistener
endpointRef
)
io
#
(_,
mbHostDuplexChan
,_,
io
)
=
receive_MT
(
?
Just
0
)
(
pack_tcplistener
endpointRef
)
io
=
case
mbHostDuplexChan
of
No
thing
?
No
ne
->
(
ls
,
{
ps
&
io
=
io
})
Just
hostDuplexChan
?
Just
hostDuplexChan
->
f
(
Received
hostDuplexChan
)
(
ls
,
{
ps
&
io
=
io
})
getReceiverType
_
...
...
@@ -178,7 +178,7 @@ where
handleReceiveEvent
::
!
Id
!
Int
((
ReceiveMsg
ByteSeq
)
->
*(.
ls
,
PSt
.
a
)
->
*(.
ls
,
PSt
.
a
))
(!
InetEvent
,
!
EndpointRef
,
!
Int
)
*(.
ls
,
PSt
.
a
)
->
*(.
ls
,
PSt
.
a
)
handleReceiveEvent
_
maxSize
f
(
IE_RECEIVED
,
endpointRef
,_)
(
ls
,
ps
=:{
io
})
#
(_,
mbTCPData
,_,
io
)
=
receive_MT
(
Just
0
)
(
pack_tcprchan
(
endpointRef
,
maxSize
))
io
#
(_,
mbTCPData
,_,
io
)
=
receive_MT
(
?
Just
0
)
(
pack_tcprchan
(
endpointRef
,
maxSize
))
io
|
isNothing
mbTCPData
=
(
ls
,{
ps
&
io
=
io
})
=
f
(
Received
(
fromJust
mbTCPData
))
(
ls
,{
ps
&
io
=
io
})
...
...
Libraries/TCPIP/ObjectIO/StdTCPChannels.icl
View file @
fb773dae
...
...
@@ -48,7 +48,7 @@ instance SelectReceive Void
accRChannels
_
void
=
([],
void
)
getRState
_
void
env
=
(
No
thing
,
void
,
env
)
=
(
?
No
ne
,
void
,
env
)
instance
getNrOfChannels
(:^:
*
x
*
y
)
|
getNrOfChannels
x
&
getNrOfChannels
y
where
...
...
Write
Preview
Supports
Markdown
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