A Port of TI's Webserver for the CC3000

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers HttpCore.h Source File

HttpCore.h

00001 /*****************************************************************************
00002 *
00003 *  HttpCore.h
00004 *  Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
00005 *
00006 *  Redistribution and use in source and binary forms, with or without
00007 *  modification, are permitted provided that the following conditions
00008 *  are met:
00009 *
00010 *    Redistributions of source code must retain the above copyright
00011 *    notice, this list of conditions and the following disclaimer.
00012 *
00013 *    Redistributions in binary form must reproduce the above copyright
00014 *    notice, this list of conditions and the following disclaimer in the
00015 *    documentation and/or other materials provided with the   
00016 *    distribution.
00017 *
00018 *    Neither the name of Texas Instruments Incorporated nor the names of
00019 *    its contributors may be used to endorse or promote products derived
00020 *    from this software without specific prior written permission.
00021 *
00022 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
00023 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
00024 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00025 *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
00026 *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
00027 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
00028 *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00029 *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00030 *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
00031 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
00032 *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00033 *
00034 *****************************************************************************/
00035 #ifndef _HTTP_CORE_H_
00036 #define _HTTP_CORE_H_
00037 
00038 /** 
00039  * @defgroup HttpCore HTTP Server core
00040  * This module implements the HTTP server core
00041  *
00042  * @{
00043  */
00044 
00045 /// The TCP port to listen on.
00046 #define HTTP_CORE_SERVER_PORT 80
00047 
00048 /// Maximum number of concurrent client connections. This should be one less than the CC3000 maximum number of sockets
00049 #define HTTP_CORE_MAX_CONNECTIONS 3
00050 
00051 /// Maximum size for a received or sent packet. Two buffers of this size must be allocated at all times.
00052 #define HTTP_CORE_MAX_PACKET_SIZE_RECEIVED 912
00053 
00054 /// Maximum size for a received or sent packet. Two buffers of this size must be allocated at all times.
00055 #define HTTP_CORE_MAX_PACKET_SIZE_SEND 912
00056 
00057 /// Maximum length of header line which might be buffered, per connection, if a line is broken between packets
00058 #define HTTP_CORE_MAX_HEADER_LINE_LENGTH 320
00059 
00060 /**
00061  * Initialize and start the HTTP server.
00062  * The Wifi interface of the CC3000 chip should be initialized by now, and connected to the network
00063  */
00064 void HttpServerInitAndRun();
00065 
00066 /// @}
00067 
00068 #endif //_HTTP_CORE_H_
00069