Browse Source

Fixed bug

proto
Thomas Johnson 2 years ago
parent
commit
7fd2e95995
  1. 11
      proto/ProtoOut.java

11
proto/ProtoOut.java

@ -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

Loading…
Cancel
Save