• Post Reply Bookmark Topic Watch Topic
  • New Topic

Socket communication between java to vb app  RSS feed

 
lava kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any one can help me for communication between java to vb

here server is in java code and client is in vb code

client is establishing port and send sample string from server if try to reply
the same string vb client not recieveing any string

my server code is below


try{
in = new BufferedReader(new InputStreamReader(client.getInputStream()));
out = new PrintWriter(client.getOutputStream(), true);
} catch (IOException e) {
System.out.println("Accept failed: 4444");
System.exit(-1);
}

while(true){
try{
line = in.readLine();
//Send data back to client
System.out.println("Server recieved"+line);


out.println("Server socket recieved"+line);
 
Joe Ess
Bartender
Posts: 9426
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by lava kumar:

the same string vb client not recieveing any string


Welcome to the JavaRanch.
You aren't sending any data to the client.
Please Post Real Code
[ August 06, 2008: Message edited by: Joe Ess ]
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should also read Don't println to a socket.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!