Skip to content

Commit

Permalink
Convert to socket, not duplex
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanMartinez committed Jul 14, 2023
1 parent 9743862 commit 21122a4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Node/TLS/Socket.purs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Node.TLS.Socket
( toDuplex
( toTcpSocket
, newClientTlsSocket
, newClientTlsSocket'
, newServerTlsSocket
Expand Down Expand Up @@ -44,15 +44,14 @@ import Foreign (Foreign)
import Node.Buffer (Buffer)
import Node.EventEmitter (EventHandle(..))
import Node.EventEmitter.UtilTypes (EventHandle1, EventHandle0)
import Node.Net.Types (Socket, TCP, ConnectTcpOptions)
import Node.Stream (Duplex)
import Node.Net.Types (ConnectTcpOptions, Socket, TCP)
import Node.TLS.Types (CipherObject, Client, ConnectTlsSocketOptions, CreateSecureContextOptions, EphemeralKeyInfoDH, EphemeralKeyInfoECDH, NewTlsSocketOptions, Server, TlsSocket)
import Partial.Unsafe (unsafeCrashWith)
import Prim.Row as Row
import Unsafe.Coerce (unsafeCoerce)

toDuplex :: forall endpoint. TlsSocket endpoint -> Duplex
toDuplex = unsafeCoerce
toTcpSocket :: forall endpoint. TlsSocket endpoint -> Socket TCP
toTcpSocket = unsafeCoerce

newClientTlsSocket :: Socket TCP -> Effect (TlsSocket Client)
newClientTlsSocket s = runEffectFn1 newTlsSocketImpl s
Expand Down

0 comments on commit 21122a4

Please sign in to comment.