Skip to content

Commit 21122a4

Browse files
Convert to socket, not duplex
1 parent 9743862 commit 21122a4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/Node/TLS/Socket.purs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Node.TLS.Socket
2-
( toDuplex
2+
( toTcpSocket
33
, newClientTlsSocket
44
, newClientTlsSocket'
55
, newServerTlsSocket
@@ -44,15 +44,14 @@ import Foreign (Foreign)
4444
import Node.Buffer (Buffer)
4545
import Node.EventEmitter (EventHandle(..))
4646
import Node.EventEmitter.UtilTypes (EventHandle1, EventHandle0)
47-
import Node.Net.Types (Socket, TCP, ConnectTcpOptions)
48-
import Node.Stream (Duplex)
47+
import Node.Net.Types (ConnectTcpOptions, Socket, TCP)
4948
import Node.TLS.Types (CipherObject, Client, ConnectTlsSocketOptions, CreateSecureContextOptions, EphemeralKeyInfoDH, EphemeralKeyInfoECDH, NewTlsSocketOptions, Server, TlsSocket)
5049
import Partial.Unsafe (unsafeCrashWith)
5150
import Prim.Row as Row
5251
import Unsafe.Coerce (unsafeCoerce)
5352

54-
toDuplex :: forall endpoint. TlsSocket endpoint -> Duplex
55-
toDuplex = unsafeCoerce
53+
toTcpSocket :: forall endpoint. TlsSocket endpoint -> Socket TCP
54+
toTcpSocket = unsafeCoerce
5655

5756
newClientTlsSocket :: Socket TCP -> Effect (TlsSocket Client)
5857
newClientTlsSocket s = runEffectFn1 newTlsSocketImpl s

0 commit comments

Comments
 (0)