Null socket After opening and closing 18 new socket
"Kiese Mukana" <[email protected]> Fri, 28 May 2004 13:12:18 -0500
| Newsgroups | gmane.comp.hardware.microcontrollers.tini |
|---|---|
| Message-ID | <[email protected]> |
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