Using socket IO communications has little to do with tapestry development,
unless you are talking about IO from browser to server. Maybe your case is
different?

I would go look at the tutorials on the java.sun.com website about socket IO
and create very tiny test classes that don't run in any other container to
confirm my functionality first before complicating it with web app stuff.

On 5/29/06, Peter Dawn <[EMAIL PROTECTED]> wrote:

hi all,

i am working on implementing TCP/IP socket communication within my web
app. I have been able to send messages from a set port to an external
application (a dummy server program) and that application is able to
receive my send messages.

however I am unable to receive messages back from the external
application. actually when the application does send something back I
am able to read something, but its all gibberish.

this is my code for receiving data from the application,

int avInt = in.available();

String avStr = "";
Debug.println("Number of bytes sent: " + avStr.valueOf(avInt));

int x = 0;
StringBuffer y = new StringBuffer();
while (x < avInt) {
   char b = in.readChar();
   String a = "";
   y.setLength(1);
   y.setCharAt(0,(char)b);
   Debug.println("+++++" + y.toString());
   x++;
}

now when i send asdfas from the server, i receive
+++++?
+++++?
+++++?
+++++?
+++++?
+++++?

obviously i am expecing to read asdfas.

any help guys. thanks in advance.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

Reply via email to