摘要: SIP协议属于应用层协议,运行于TCP,UDP,SCTP等各种传输层协议之上。按逻辑功能区分,SIP系统由4种元素组成:用户代理、代理服务器、重定向服务器、注册服务器。用户代理(User Agent),分为两个部分:客户端(User Agent Client),负责发起呼叫;用户代理服务器(User Agent Server),负责接收呼叫并作出响应。这二者存在于用户终端中代理服务器(Proxy Server),负责接收用户代理发来的请求,根据网络策略将请求发给相应的服务器,并根据收到的应答对用户作出响应重定向服务器(Redirect Server),用于在需要时,将用户新的位置返回给呼叫方。 阅读全文
posted @ 2013-03-31 22:27 大器天下 阅读(354) 评论(0) 推荐(0) 编辑
摘要: ARM开发板买回来很久了,一直没有动过,最近准备开始弄一弄。几天前熟悉了一下板子的基本接口和相关的文档,今天先把交叉编译环境弄好。首先是安装linux虚拟机我用的是CentOS+VirtualBox,目前正在安装,趁这个间隙来写一写博客。坐等他安装好吧……安装完成了,下面要设置一下共享文件夹。首先要安装VirtualBox的增强功能。“设备->安装增强功能”这里有一点要说明,一般遇到问题的时候,不要盲目的Google或者baidu,有官方文档一定要先看官方文档,里面讲的清晰明白,这是最好的解决方法。这里我选择的是自动挂载建立交叉编译环境这里用的是所买板子自己做好的交叉编译环境,所以按照他 阅读全文
posted @ 2013-03-30 10:41 大器天下 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 这个二叉树弄了一上午,不过原理上基本上懂了,还发现,其实用C来写树的话,由于指针的存在更容易理解。下面是代码,参考“一线码农”,发现他的删除函数其实写的是有问题的,经过修改之后顺利通过。using System;using System.Collections.Generic;using System.Linq;using System.Text;//哈希查找程序namespace Test{ class Program { static void Main(string[] args) { List<int> li... 阅读全文
posted @ 2013-03-28 11:34 大器天下 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 索引查找其实这个算法没有怎么理解了。上代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;//哈希查找程序namespace Test{ class Program { //索引实体 class IndexItem { public int index; public int start; public int length; } ... 阅读全文
posted @ 2013-03-27 11:19 大器天下 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 今天想调试google官方给的sip-deamon,结果启动不了adbC:\Users\xxxx>adb start-serveradb server is out of date. killing...ADB server didn't ACK* failed to start daemon *一直这样报错,百度一下,才知道是端口被占用了。C:\Users\xxxx>adb nodaemon servercannot bind 'tcp:5037'查看是哪个端口被占用C:\Users\xxxxxx>netstat -ano | findstr &qu 阅读全文
posted @ 2013-03-27 09:27 大器天下 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 之前学过一段时间android,一直也没有开发过什么大的项目。最近经过韩总鼓励,想做一个android设备上的软电话,顺便练手。android系统架构从下至上,android系统分为4个层次:Linux内核和硬件驱动,由C语言实现本地代码库,用C/C++实现,这些代码以动态链接库的形式存在,向下使用android系统的各种组件,向上可以被应用程序框架层调用以提供服务。Java框架。android设计了应用程序API框架,这些API功能包括:活动管理器(Activity Manager)、窗口管理器(Window Manager)、内容提供器(Content Providers)、视图系统(Vi 阅读全文
posted @ 2013-03-17 23:19 大器天下 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 哈希查找:哈希查找是ο(1)的查找方法其中有两点要注意“哈希函数”和“解决冲突”哈希函数有两个标准1、key尽可能的分散,防止发生冲突。2、函数要简单,尽量不做复杂的运算。下面的代码用到的哈希函数为:除法取余,解决冲突的方法为:开放地址法。代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;//哈希查找程序namespace Test{ class Program { static int hashLength = 13; static ... 阅读全文
posted @ 2013-03-15 23:02 大器天下 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 二分查找有两个条件:数组必须有序,无序数组查找之前需要先让其有序只限于顺序存储结构代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;using System.Net;using System.Threading;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { ... 阅读全文
posted @ 2013-03-15 11:39 大器天下 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 归并排序:主要思想是,将一列无序数,无限分组,直至分成单个元素,然后归并,因为归并前,两组数据都已经有序,所以复杂度要小。代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Test{ class Program { static void Main(string[] args) { int[] array = { 3, 1, 2, 9, 7, 8, 6 }; Console... 阅读全文
posted @ 2013-03-14 23:32 大器天下 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 希尔排序:插入排序的升级版,主要采用了分组的策略,采用逐渐减小步长来控制分组的大小,各组内采用插入排序,当步长减小为1的时候,大部分数据都已经有序,所以较插入排序优化了许多。代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;using System.Net;using System.Threading;namespace ConsoleApplication1{ class Program { sta... 阅读全文
posted @ 2013-03-12 23:33 大器天下 阅读(212) 评论(0) 推荐(0) 编辑