Hi Neil,

 

I am currently using uIP 0.9 as well for my final year project. The only 
difference is I ported uIP on the top of FreeRTOS 4.0.

 

I have a problem with connecting to a simple listening server which I developed 
by using java server socket. As I made an attempt to establish a connection to 
the host server, the server returns an error message on the console of 
"connection reset". I am not sure what the problem is. As far as I am 
concerned, the server works fine when I connect to it using MS telnet. Could 
you please let me know how exactly I can make a connection and hence transmit 
packets? And do you have a sample of source code on how it is done? What sort 
of server are you using? Finally here is my code for my simple client socket 
software:

 

#include "report.h"

#include "uip.h"

 

void report_init(void)

{

u16_t ipaddr[2];

            uip_ipaddr(&ipaddr, 192,168,1,68);

            uip_connect(&ipaddr, HTONS(1234));

}

 

void report_app(void)

{

            if (uip_connected() || uip_rexmit())

            {

                        uip_send("hi/n",3); 

                        return;

            }

}

 

Attached is the java code for my server. Could you please help me with this 
problem?

 

Thank you,

 

Regards,

Izrie

 

   _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neil Jeffery
Sent: 28 February 2007 5:30 PM
To: uip-users@sics.se
Subject: [uip-users] Disconnection Problem

 

Hi,

 

I am using uIP 0.9 on a SPARC processor as part of my final year project.

 

At present I have the httpd example and a simple TCP receiver running, the 
connected port determines which process runs.

 

At present I can send TCP packets to the port the receiver is listening on and 
it can receive and process them fine.  However when I close the connection 
remotely I can never reconnect.

 

When the app is called there is a list of if statements relating to the 
uip_newdata(), uip_closed() etc. functions.  When the TCP connection is closed 
the uip_closed() function is true and the program prints "Connection Closed" to 
the console.  I have noticed however that this is always written twice 
indicating that the closed event occurs twice.  I have tried doing nothing when 
uip_closed is true and I have tried running uip_close() neither seem to work.

 

The httpd server allows disconnection and reconnection however.

 

Any ideas?

 

Many thanks

 

Neil Jeffery


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.4/705 - Release Date: 27/02/2007 3:24 
PM



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.5/707 - Release Date: 01/03/2007 2:43 
PM
 
  

Attachment: DatabaseServer.java
Description: DatabaseServer.java

Reply via email to