It is used to query a socket state (established, closed, and so on).
err_t LibTCPGetHostName(PTCP_PCB pcb, struct ip_addr *const ipaddr, u16_t *const port);
void LibTCPAccept(PTCP_PCB pcb, struct tcp_pcb *listen_pcb, void *arg);
void LibTCPSetNoDelay(PTCP_PCB pcb, BOOLEAN Set);
+void LibTCPGetSocketStatus(PTCP_PCB pcb, PULONG State);
/* IP functions */
void LibIPInsertPacket(void *ifarg, const void *const data, const u32_t size);
else
pcb->flags &= ~TF_NODELAY;
}
+
+void
+LibTCPGetSocketStatus(
+ PTCP_PCB pcb,
+ PULONG State)
+{
+ /* Translate state from enum tcp_state -> MIB_TCP_STATE */
+ *State = pcb->state + 1;
+}