Re: Null socket After opening and closing 18 new socket

"Kris Ardis" <Kristopher.Ardis-6tN4nzCoH/[email protected]> Thu, 3 Jun 2004 14:27:03 -0500
Newsgroups gmane.comp.hardware.microcontrollers.tini
Message-ID <009501c449a0$c0082210$764000b4@kardis>
This sounds like you have run out of sockets.  Are you seeing any of the
error messages you print out when exceptions occur?  It is generally safest
to close a socket in a finally branch of a try statement so that an
exception doesn't cause you to miss the call to close().

Can you do a 'netstat' from the slush prompt when you reach this error
condition and see how many sockets are open?  What firmware version are you
using?

Kris

----- Original Message -----
From: "Kiese Mukana" <[email protected]>
To: <tini-6tN4nzCoH/[email protected]>
Sent: Friday, May 28, 2004 1:12 PM
Subject: [TINI]Null socket After opening and closing 18 new socket


> I am trying to set up a communication between Tini and an HTLM page
running on a PC. I have an applet downloaded from TINI an running with the
HTLM page. The applet sends an update command to TINI. Currently all TINI
does is send back its time. After sending 18 time update, I get an
IOException (null) when opening an new socket. Does anyone know what I
should do. Do I have to set some parameters for the socket?
>
> The following code sample is the method used by TINI to send the time.
>
> > public void sendBytes(byte[] toSend){
> > sock = null;
> > out = null;
> > try{
> > System.out.print("Socket:");
> > sock = new Socket(appletIP, 8888);
> > sockNumber += 1;
> > System.out.println(" " + sockNumber);
> > out = sock.getOutputStream();
> > out.write(toSend);
> > out.flush();
> > out.close();
> > sock.close();
> > } // End of try
> > catch(Exception e){
> > System.out.println("Error : " + e.getMessage());
> > } // End of catch
> > }
>
> Thanks,
>
> KC
> _______________________________________________
> TINI mailing list
> TINI-6tN4nzCoH/[email protected]
> To UNSUBSCRIBE, edit your profile, or see list archives:
> http://lists.dalsemi.com/mailman/listinfo/tini
>


_______________________________________________
TINI mailing list
TINI-6tN4nzCoH/[email protected]
To UNSUBSCRIBE, edit your profile, or see list archives:
http://lists.dalsemi.com/mailman/listinfo/tini