#ifndef SGP_H
#define SGP_H
#define SGP_PORT (6666)
/*********************************************************************
* Function: void HTTPInit(void)
*
* PreCondition: TCP must already be initialized.
*
* Input: None
*
* Output: HTTP FSM and connections are initialized
*
* Side Effects: None
*
* Overview: Set all HTTP connections to Listening state.
* Initialize FSM for each connection.
*
* Note: This function is called only one during lifetime
* of the application.
********************************************************************/
void SGPInit(void);
/*********************************************************************
* Function: void HTTPServer(void)
*
* PreCondition: HTTPInit() must already be called.
*
* Input: None
*
* Output: Opened HTTP connections are served.
*
* Side Effects: None
*
* Overview: Browse through each connections and let it
* handle its connection.
* If a connection is not finished, do not process
* next connections. This must be done, all
* connections use some static variables that are
* common.
*
* Note: This function acts as a task (similar to one in
* RTOS). This function performs its task in
* co-operative manner. Main application must call
* this function repeatdly to ensure all open
* or new connections are served on time.
********************************************************************/
void SGPServer(void);
#endif