1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950(*
* Copyright (C) Citrix Systems Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; version 2.1 only. with the special
* exception on linking described in file LICENSE.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*)typetls_channel={read_tls:Cstruct.t->unitLwt.t;write_tls:Cstruct.t->unitLwt.t;close_tls:unit->unitLwt.t;}typecleartext_channel={read_clear:Cstruct.t->unitLwt.t;write_clear:Cstruct.t->unitLwt.t;close_clear:unit->unitLwt.t;make_tls_channel:(unit->tls_channelLwt.t)option;}typegeneric_channel={is_tls:bool;read:Cstruct.t->unitLwt.t;write:Cstruct.t->unitLwt.t;close:unit->unitLwt.t;}typechannel=generic_channelletgeneric_of_tls_channelch={read=ch.read_tls;write=ch.write_tls;close=ch.close_tls;is_tls=true;}letgeneric_of_cleartext_channelch={read=ch.read_clear;write=ch.write_clear;close=ch.close_clear;is_tls=false;}