sig
  type tcp_connection
  type t = CL_TCPConnection.tcp_connection CL_IODevice.t
  external init :
    remote:CL_SocketName.t ->
    ?local:CL_SocketName.t -> unit -> CL_TCPConnection.t
    = "caml_CL_TCPConnection_init"
  external delete : conn:CL_TCPConnection.t -> unit
    = "caml_CL_TCPConnection_delete"
  external send :
    CL_TCPConnection.t -> data:string -> ?send_all:bool -> unit -> int
    = "caml_CL_TCPConnection_send"
  external receive :
    CL_TCPConnection.t -> data:string -> ?receive_all:bool -> unit -> int
    = "caml_CL_TCPConnection_receive"
  external disconnect_graceful : conn:CL_TCPConnection.t -> unit
    = "caml_CL_TCPConnection_disconnect_graceful"
  external disconnect_abortive : conn:CL_TCPConnection.t -> unit
    = "caml_CL_TCPConnection_disconnect_abortive"
  external set_nodelay :
    conn:CL_TCPConnection.t -> ?enable:bool -> unit -> unit
    = "caml_CL_TCPConnection_set_nodelay"
  external get_local_name : unit -> CL_SocketName.t
    = "caml_CL_TCPConnection_get_local_name"
  external get_remote_name : unit -> CL_SocketName.t
    = "caml_CL_TCPConnection_get_remote_name"
end