FindMatchingSocket Function

Microchip TCP/IP Stack

Microchip TCP/IP Stack Help
FindMatchingSocket Function
C
static BOOL FindMatchingSocket(
    TCP_HEADER* h, 
    NODE_INFO* remote
);
Description

This function searches through the sockets and attempts to match one with a given TCP header and NODE_INFO structure. If a socket is found, its index is saved in hCurrentTCP and the associated MyTCBStub and MyTCB are loaded. Otherwise, INVALID_SOCKET is placed in hCurrentTCP.

Preconditions

TCP is initialized.

Parameters
Parameters 
Description 
TCP header to be matched against 
remote 
The remote node who sent this header 
Return Values
Return Values 
Description 
TRUE 
A match was found and is loaded in hCurrentTCP 
FALSE 
No suitable socket was found and hCurrentTCP is INVALID_SOCKET 
Microchip TCP/IP Stack 5.42.08 - June 15, 2013
Copyright © 2012 Microchip Technology, Inc.  All rights reserved.