server/red_channel: add red_channel_is_connected

This commit is contained in:
Alon Levy 2010-11-07 12:23:59 +02:00
parent 045be6b03a
commit 1540a64030
2 changed files with 7 additions and 0 deletions

View File

@ -571,6 +571,11 @@ static PipeItem *red_channel_pipe_get(RedChannel *channel)
return item;
}
int red_channel_is_connected(RedChannel *channel)
{
return !!channel->peer;
}
static void red_channel_pipe_clear(RedChannel *channel)
{
PipeItem *item;

View File

@ -182,6 +182,8 @@ RedChannel *red_channel_create_parser(int size, RedsStreamContext *peer,
channel_on_incoming_error_proc incoming_error,
channel_on_outgoing_error_proc outgoing_error);
int red_channel_is_connected(RedChannel *channel);
void red_channel_destroy(RedChannel *channel);
void red_channel_shutdown(RedChannel *channel);