|
|
@ -43,6 +43,15 @@ public class ProtoOut |
|
|
|
out.write(nameBytes); |
|
|
|
} |
|
|
|
|
|
|
|
synchronized public void sendError(String username, byte message[]) throws IOException |
|
|
|
{ |
|
|
|
out.writeByte(ProtoID.ERROR.b); |
|
|
|
out.writeInt(message.length); |
|
|
|
writeUserName(username); |
|
|
|
out.write(message); |
|
|
|
commit(); |
|
|
|
} |
|
|
|
|
|
|
|
synchronized public void sendJoin(String username) throws IOException |
|
|
|
{ |
|
|
|
out.writeByte(ProtoID.JOIN.b); |
|
|
@ -87,6 +96,7 @@ public class ProtoOut |
|
|
|
out.writeInt(msgb.length); |
|
|
|
writeUserName(username); |
|
|
|
out.write(msgb); |
|
|
|
commit(); |
|
|
|
} |
|
|
|
|
|
|
|
synchronized public void sendFile(String username, String filename, byte data[]) throws IOException |
|
|
@ -100,6 +110,7 @@ public class ProtoOut |
|
|
|
out.writeByte(fnb.length); |
|
|
|
out.write(fnb); |
|
|
|
out.write(data); |
|
|
|
commit(); |
|
|
|
} |
|
|
|
|
|
|
|
synchronized public void sendInfo(String username) throws IOException |
|
|
|