mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
@@ -1,7 +1,5 @@
|
||||
package org.briarproject.api.sync;
|
||||
|
||||
import static org.briarproject.api.sync.SyncConstants.MAX_GROUP_DESCRIPTOR_LENGTH;
|
||||
|
||||
public class Group {
|
||||
|
||||
private final GroupId id;
|
||||
@@ -9,8 +7,6 @@ public class Group {
|
||||
private final byte[] descriptor;
|
||||
|
||||
public Group(GroupId id, ClientId clientId, byte[] descriptor) {
|
||||
if (descriptor.length > MAX_GROUP_DESCRIPTOR_LENGTH)
|
||||
throw new IllegalArgumentException();
|
||||
this.id = id;
|
||||
this.clientId = clientId;
|
||||
this.descriptor = descriptor;
|
||||
|
||||
@@ -13,9 +13,6 @@ public interface SyncConstants {
|
||||
/** The maximum length of the packet payload in bytes. */
|
||||
int MAX_PACKET_PAYLOAD_LENGTH = 32 * 1024; // 32 KiB
|
||||
|
||||
/** The maximum length of a group descriptor in bytes. */
|
||||
int MAX_GROUP_DESCRIPTOR_LENGTH = 100; // TODO: Remove
|
||||
|
||||
/** The maximum length of a message in bytes. */
|
||||
int MAX_MESSAGE_LENGTH = MAX_PACKET_PAYLOAD_LENGTH - PACKET_HEADER_LENGTH;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user