hans-3.0.2: Network Stack

Safe HaskellNone
LanguageHaskell2010

Hans.Tcp.Output

Contents

Synopsis

Output

routeTcp :: Network addr => NetworkStack -> Device -> addr -> addr -> TcpHeader -> ByteString -> IO Bool Source #

Send outgoing tcp segments, with a route calculation.

See note "No Retransmit Queue" (Hans.Tcp.Output).

sendTcp :: Network addr => NetworkStack -> RouteInfo addr -> addr -> TcpHeader -> ByteString -> IO Bool Source #

Lowest-level output function for TCP.

See note "No Retransmit Queue" (Hans.Tcp.Output).

With a TCB

sendWithTcb :: NetworkStack -> Tcb -> TcpHeader -> ByteString -> IO (Maybe Int64) Source #

Send a segment and queue it in the remote window. The number of bytes that were sent is returned.

sendAck :: NetworkStack -> Tcb -> IO () Source #

Send a single ACK immediately.

sendFin :: NetworkStack -> Tcb -> IO () Source #

Send a single FIN packet.

sendData :: NetworkStack -> Tcb -> ByteString -> IO Int64 Source #

Send a data segment, potentially sending multiple packets if the send window allows, and the payload is larger than MSS. When the remote window is full, this returns 0.

canSend :: Tcb -> IO Bool Source #

Determine if there is any room in the remote window for us to send data.

From the fast-path

queueTcp :: NetworkStack -> RouteInfo Addr -> Addr -> TcpHeader -> ByteString -> IO Bool Source #

Queue an outgoing TCP segment from the fast-path.

See note "No Retransmit Queue" (Hans.Tcp.Output).

queueWithTcb :: NetworkStack -> Tcb -> TcpHeader -> ByteString -> IO Bool Source #

Queue an outgoing TCP segment from the fast-path.

queueAck :: NetworkStack -> Tcb -> IO Bool Source #

Queue an ACK from the fast-path.

responder :: NetworkStack -> IO () Source #

Responder thread for messages generated in the fast-path.

No Retransmit Queue

This function will not record entries in the retransmit queue, and is responsible only for output to a lower layer.