diff options
| author | Adelyn Breelove <[email protected]> | 2019-01-29 13:38:27 -0700 |
|---|---|---|
| committer | Adelyn Breelove <[email protected]> | 2019-01-29 13:38:27 -0700 |
| commit | 43ad34645cd2dd18553a5e647a951963b91f322e (patch) | |
| tree | e91364ae70b9b009d60fadb4d6a1dfe9a82b73e7 /lib/sharder.mli | |
| parent | Compression!!! (diff) | |
| download | disml-43ad34645cd2dd18553a5e647a951963b91f322e.tar.xz disml-43ad34645cd2dd18553a5e647a951963b91f322e.zip | |
A few improvements to how compression is handled internally
Diffstat (limited to 'lib/sharder.mli')
| -rw-r--r-- | lib/sharder.mli | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/sharder.mli b/lib/sharder.mli index 5017a86..f5002ee 100644 --- a/lib/sharder.mli +++ b/lib/sharder.mli @@ -12,6 +12,7 @@ type t (** Start the Sharder. This is called by {!Client.start}. *)
val start :
?count:int ->
+ ?compress:bool ->
unit ->
t Deferred.t
@@ -19,14 +20,15 @@ val start : module Shard : sig
(** Representation of the state of a shard. *)
type shard = {
+ compress: bool; (** Whether to compress payloads. *)
+ id: int * int; (** A tuple as expected by Discord. First element is the current shard index, second element is the total shard count. *)
hb_interval: Time.Span.t Ivar.t; (** Time span between heartbeats, wrapped in an Ivar. *)
hb_stopper: unit Ivar.t; (** Stops the heartbeat sequencer when filled. *)
- seq: int; (** Current sequence number *)
- session: string option; (** Session id, if one exists. *)
pipe: Frame.t Pipe.Reader.t * Frame.t Pipe.Writer.t; (** Raw frame IO pipe used for websocket communications. *)
ready: unit Ivar.t; (** A simple Ivar indicating if the shard has received READY. *)
+ seq: int; (** Current sequence number *)
+ session: string option; (** Session id, if one exists. *)
url: string; (** The websocket URL in use. *)
- id: int * int; (** A tuple as expected by Discord. First element is the current shard index, second element is the total shard count. *)
_internal: Reader.t * Writer.t;
}
@@ -58,6 +60,7 @@ module Shard : sig val create :
url:string ->
shards:int * int ->
+ ?compress:bool ->
unit ->
shard Deferred.t
|