Gestion des fenetres de clavardage
This commit is contained in:
parent
2caf30da03
commit
711cc37040
1 changed files with 5 additions and 3 deletions
|
@ -64,7 +64,7 @@ public class SessionClavardage extends Thread {
|
|||
public void arretSession() {
|
||||
MessageHorodate msgh = new MessageHorodate(getU2(),getApp().getMe(),".",2);
|
||||
try {
|
||||
getOut().writeObject(msgh);
|
||||
getOut().writeObject(msgh.toString());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ public class SessionClavardage extends Thread {
|
|||
public void envoiMsg(String msg) {
|
||||
MessageHorodate msgh = new MessageHorodate(getU2(),getApp().getMe(),msg,1);
|
||||
try {
|
||||
getOut().writeObject(msgh);
|
||||
getOut().writeObject(msgh.toString());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -93,10 +93,12 @@ public class SessionClavardage extends Thread {
|
|||
|
||||
|
||||
public void run() {
|
||||
String plaintext = null;
|
||||
MessageHorodate msg = null;
|
||||
while(true) {
|
||||
try {
|
||||
msg = (MessageHorodate) getIn().readObject();
|
||||
plaintext = (String) getIn().readObject();
|
||||
msg = MessageHorodate.stringToMessageHorodate(plaintext);
|
||||
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Reference in a new issue