sig
  type ('a, 'listening_on) t constraint 'a = [< Import.Socket.Address.t ]
  type inet = (Import.Socket.Address.Inet.t, int) Tcp.Server.t
  type unix = (Import.Socket.Address.Unix.t, string) Tcp.Server.t
  val invariant : ([< Import.Socket.Address.t ], 'a) Tcp.Server.t -> unit
  val listening_on :
    ([< Import.Socket.Address.t ], 'listening_on) Tcp.Server.t ->
    'listening_on
  val close :
    ([< Import.Socket.Address.t ], 'a) Tcp.Server.t -> unit Import.Deferred.t
  val close_finished :
    ([< Import.Socket.Address.t ], 'a) Tcp.Server.t -> unit Import.Deferred.t
  val is_closed : ([< Import.Socket.Address.t ], 'a) Tcp.Server.t -> bool
  val create :
    ?max_connections:int ->
    ?max_pending_connections:int ->
    ?buffer_age_limit:Import.Writer.buffer_age_limit ->
    ?on_handler_error:[ `Call of
                          ([< Import.Socket.Address.t ] as 'a) -> exn -> unit
                      | `Ignore
                      | `Raise ] ->
    ('a, 'listening_on) Tcp.Where_to_listen.t ->
    ('-> Import.Reader.t -> Import.Writer.t -> unit Import.Deferred.t) ->
    ('a, 'listening_on) Tcp.Server.t Import.Deferred.t
end