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 * @file
tax 0:66300c77c6e9 3 * lwIP Operating System abstraction
tax 0:66300c77c6e9 4 *
tax 0:66300c77c6e9 5 */
tax 0:66300c77c6e9 6
tax 0:66300c77c6e9 7 /*
tax 0:66300c77c6e9 8 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
tax 0:66300c77c6e9 9 * All rights reserved.
tax 0:66300c77c6e9 10 *
tax 0:66300c77c6e9 11 * Redistribution and use in source and binary forms, with or without modification,
tax 0:66300c77c6e9 12 * are permitted provided that the following conditions are met:
tax 0:66300c77c6e9 13 *
tax 0:66300c77c6e9 14 * 1. Redistributions of source code must retain the above copyright notice,
tax 0:66300c77c6e9 15 * this list of conditions and the following disclaimer.
tax 0:66300c77c6e9 16 * 2. Redistributions in binary form must reproduce the above copyright notice,
tax 0:66300c77c6e9 17 * this list of conditions and the following disclaimer in the documentation
tax 0:66300c77c6e9 18 * and/or other materials provided with the distribution.
tax 0:66300c77c6e9 19 * 3. The name of the author may not be used to endorse or promote products
tax 0:66300c77c6e9 20 * derived from this software without specific prior written permission.
tax 0:66300c77c6e9 21 *
tax 0:66300c77c6e9 22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
tax 0:66300c77c6e9 23 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
tax 0:66300c77c6e9 24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
tax 0:66300c77c6e9 25 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
tax 0:66300c77c6e9 26 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
tax 0:66300c77c6e9 27 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
tax 0:66300c77c6e9 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
tax 0:66300c77c6e9 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
tax 0:66300c77c6e9 30 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
tax 0:66300c77c6e9 31 * OF SUCH DAMAGE.
tax 0:66300c77c6e9 32 *
tax 0:66300c77c6e9 33 * This file is part of the lwIP TCP/IP stack.
tax 0:66300c77c6e9 34 *
tax 0:66300c77c6e9 35 * Author: Adam Dunkels <adam@sics.se>
tax 0:66300c77c6e9 36 *
tax 0:66300c77c6e9 37 */
tax 0:66300c77c6e9 38
tax 0:66300c77c6e9 39 #include "lwip/opt.h"
tax 0:66300c77c6e9 40
tax 0:66300c77c6e9 41 #include "lwip/sys.h"
tax 0:66300c77c6e9 42
tax 0:66300c77c6e9 43 /* Most of the functions defined in sys.h must be implemented in the
tax 0:66300c77c6e9 44 * architecture-dependent file sys_arch.c */
tax 0:66300c77c6e9 45
tax 0:66300c77c6e9 46 #if !NO_SYS
tax 0:66300c77c6e9 47
tax 0:66300c77c6e9 48 /**
tax 0:66300c77c6e9 49 * Sleep for some ms. Timeouts are NOT processed while sleeping.
tax 0:66300c77c6e9 50 *
tax 0:66300c77c6e9 51 * @param ms number of milliseconds to sleep
tax 0:66300c77c6e9 52 */
tax 0:66300c77c6e9 53 void
tax 0:66300c77c6e9 54 sys_msleep(u32_t ms)
tax 0:66300c77c6e9 55 {
tax 0:66300c77c6e9 56 if (ms > 0) {
tax 0:66300c77c6e9 57 sys_sem_t delaysem;
tax 0:66300c77c6e9 58 err_t err = sys_sem_new(&delaysem, 0);
tax 0:66300c77c6e9 59 if (err == ERR_OK) {
tax 0:66300c77c6e9 60 sys_arch_sem_wait(&delaysem, ms);
tax 0:66300c77c6e9 61 sys_sem_free(&delaysem);
tax 0:66300c77c6e9 62 }
tax 0:66300c77c6e9 63 }
tax 0:66300c77c6e9 64 }
tax 0:66300c77c6e9 65
tax 0:66300c77c6e9 66 #endif /* !NO_SYS */