Communication entre java et VB : prob de socket
salut,
J'ai deux applications une en java et l'autre en VB 6 qui sont censé communiqués a travers les sockets.
Mon problème, qui est coté java, est la récuperation du message envoyé par l'application en VB.
Voici un bout de code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
try
{
Socket s = new Socket(InetAddress.getByName("localhost"),1311);
PrintStream output = new
BufferedReader client = new BufferedReader(new InputStreamReader(s.getInputStream()));
System.out.println(s.getInputStream());
try {
String msg_String = client.readLine();
System.out.println("String from the client : " + msg_String.toString());
}
catch (IOException e) {
System.out.println("Couldn't get I/O for the connection to: ");
}
}catch(Exception e)
{
e.printStackTrace();
} |
Et dans la console j'ai quelques chose comme ca :
java.net.SocketInputStream@2431b9
Et puis l'application se plante totalement!!
Pouvez vous m'aider svp ??
Merci