I have a problem getting this to work. Server only recieves half of the data being sent. Whats wrong

Dependencies:   mbed

Committer:
tax
Date:
Tue Mar 29 13:20:15 2011 +0000
Revision:
0:66300c77c6e9

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tax 0:66300c77c6e9 1 /*****************************************************************************
tax 0:66300c77c6e9 2 * randm.h - Random number generator header file.
tax 0:66300c77c6e9 3 *
tax 0:66300c77c6e9 4 * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.
tax 0:66300c77c6e9 5 * Copyright (c) 1998 Global Election Systems Inc.
tax 0:66300c77c6e9 6 *
tax 0:66300c77c6e9 7 * The authors hereby grant permission to use, copy, modify, distribute,
tax 0:66300c77c6e9 8 * and license this software and its documentation for any purpose, provided
tax 0:66300c77c6e9 9 * that existing copyright notices are retained in all copies and that this
tax 0:66300c77c6e9 10 * notice and the following disclaimer are included verbatim in any
tax 0:66300c77c6e9 11 * distributions. No written agreement, license, or royalty fee is required
tax 0:66300c77c6e9 12 * for any of the authorized uses.
tax 0:66300c77c6e9 13 *
tax 0:66300c77c6e9 14 * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR
tax 0:66300c77c6e9 15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
tax 0:66300c77c6e9 16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
tax 0:66300c77c6e9 17 * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
tax 0:66300c77c6e9 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
tax 0:66300c77c6e9 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
tax 0:66300c77c6e9 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
tax 0:66300c77c6e9 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
tax 0:66300c77c6e9 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
tax 0:66300c77c6e9 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
tax 0:66300c77c6e9 24 *
tax 0:66300c77c6e9 25 ******************************************************************************
tax 0:66300c77c6e9 26 * REVISION HISTORY
tax 0:66300c77c6e9 27 *
tax 0:66300c77c6e9 28 * 03-01-01 Marc Boucher <marc@mbsi.ca>
tax 0:66300c77c6e9 29 * Ported to lwIP.
tax 0:66300c77c6e9 30 * 98-05-29 Guy Lancaster <glanca@gesn.com>, Global Election Systems Inc.
tax 0:66300c77c6e9 31 * Extracted from avos.
tax 0:66300c77c6e9 32 *****************************************************************************/
tax 0:66300c77c6e9 33
tax 0:66300c77c6e9 34 #ifndef RANDM_H
tax 0:66300c77c6e9 35 #define RANDM_H
tax 0:66300c77c6e9 36
tax 0:66300c77c6e9 37 /***********************
tax 0:66300c77c6e9 38 *** PUBLIC FUNCTIONS ***
tax 0:66300c77c6e9 39 ***********************/
tax 0:66300c77c6e9 40 /*
tax 0:66300c77c6e9 41 * Initialize the random number generator.
tax 0:66300c77c6e9 42 */
tax 0:66300c77c6e9 43 void avRandomInit(void);
tax 0:66300c77c6e9 44
tax 0:66300c77c6e9 45 /*
tax 0:66300c77c6e9 46 * Churn the randomness pool on a random event. Call this early and often
tax 0:66300c77c6e9 47 * on random and semi-random system events to build randomness in time for
tax 0:66300c77c6e9 48 * usage. For randomly timed events, pass a null pointer and a zero length
tax 0:66300c77c6e9 49 * and this will use the system timer and other sources to add randomness.
tax 0:66300c77c6e9 50 * If new random data is available, pass a pointer to that and it will be
tax 0:66300c77c6e9 51 * included.
tax 0:66300c77c6e9 52 */
tax 0:66300c77c6e9 53 void avChurnRand(char *randData, u32_t randLen);
tax 0:66300c77c6e9 54
tax 0:66300c77c6e9 55 /*
tax 0:66300c77c6e9 56 * Randomize our random seed value. To be called for truely random events
tax 0:66300c77c6e9 57 * such as user operations and network traffic.
tax 0:66300c77c6e9 58 */
tax 0:66300c77c6e9 59 #if MD5_SUPPORT
tax 0:66300c77c6e9 60 #define avRandomize() avChurnRand(NULL, 0)
tax 0:66300c77c6e9 61 #else /* MD5_SUPPORT */
tax 0:66300c77c6e9 62 void avRandomize(void);
tax 0:66300c77c6e9 63 #endif /* MD5_SUPPORT */
tax 0:66300c77c6e9 64
tax 0:66300c77c6e9 65 /*
tax 0:66300c77c6e9 66 * Use the random pool to generate random data. This degrades to pseudo
tax 0:66300c77c6e9 67 * random when used faster than randomness is supplied using churnRand().
tax 0:66300c77c6e9 68 * Thus it's important to make sure that the results of this are not
tax 0:66300c77c6e9 69 * published directly because one could predict the next result to at
tax 0:66300c77c6e9 70 * least some degree. Also, it's important to get a good seed before
tax 0:66300c77c6e9 71 * the first use.
tax 0:66300c77c6e9 72 */
tax 0:66300c77c6e9 73 void avGenRand(char *buf, u32_t bufLen);
tax 0:66300c77c6e9 74
tax 0:66300c77c6e9 75 /*
tax 0:66300c77c6e9 76 * Return a new random number.
tax 0:66300c77c6e9 77 */
tax 0:66300c77c6e9 78 u32_t avRandom(void);
tax 0:66300c77c6e9 79
tax 0:66300c77c6e9 80
tax 0:66300c77c6e9 81 #endif /* RANDM_H */