Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1453715
  • 博文数量: 596
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 173
  • 用 户 组: 普通用户
  • 注册时间: 2016-07-06 15:50
个人简介

在线笔记

文章分类

全部博文(596)

文章存档

2016年(1)

2015年(104)

2014年(228)

2013年(226)

2012年(26)

2011年(11)

分类: 云计算

2013-12-13 00:24:52

RedLinkInfo *link;
link = reds_init_client_connection(socket);
主要是填充RedsStream的SpiceChannelEventInfo, 在函数外指定其回调stream_read_cb,stream_write_cb,stream_writev_cb
客户端和服务端通信的链路数据,一个socket就有一个连接。也就是一个客户端连接产生一个主通道。


  1. struct RedClient {
  2.     MainChannelClient *mcc;{
  3.             RedChannelClient base;{
  4.             RedChannel *channel;
  5.             RedClient *client;
  6.                 RedsStream *stream;
  7.         }
  8.     }
  9. }
  10. reds_handle_main_link
  11.     reds_info_new_channel(用link->linkmess更新link->stream的信息,更新为客户端发上来的数据
  12.     red_client_new(),RedClient是什么
  13.         main_channel_link,最后调用通用的接口创建MCC
  14.             main_channel_client_create
  15.                 red_channel_client_create,注册回调red_channel_client_event,初始化RCC的所有参数,
  16.                                 包括回调OutgoingHandler,IncomingHandler,SpiceDataHeaderOpaque
  17.                  size         = sizeof(MainChannelClient), reds->main_channel = main_channel_init();
  18.                  RedChannel = &main_chan->base,


阅读(1134) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~