五:数据的接收和发送 1、 发送过程: 应用发送数据时调用接口 rtp_session_send_with_ts 完成。参数为会话句柄,数据缓冲区地址,数据长度以及应用当前的时间戳。在该接口中,会先调用 rtp_session_create_packet 接口,根据缓冲区地址及数据长度,构造一个新的...
分类:
其他好文 时间:
2014-10-16 21:19:13
阅读次数:
750
By using the
params keyword, you can specify a method parameter that takes a variable number of arguments.
You can send a comma-separated list of arguments of the type specified in the parameter de...
Timer的使用:
主要用于创建每隔一段时间就执行的任务。
创建继承Task的任务类,也就是每段时间执行的任务。
private class MyTask extends TimerTask
{
@Override
public void run() {
Message msg = new Message();
msg.what = 1;
handler.send...
分类:
移动开发 时间:
2014-10-15 13:25:00
阅读次数:
186
expect+ssh修改主机密码foripin`cat/tmp/myhosts`;do
expect-c"spawnssh-p33842$ip;expect*assword*{send\"myoldpasswd\r\"};expectroot@*{send\"echoroot:‘mynewpassword‘|/usr/sbin/chpasswd\r\"};expectroot@*{send\"ipaddr\r\"};expectof";done
分类:
其他好文 时间:
2014-10-15 04:41:50
阅读次数:
204
相信大多数人在写PHP代码的时候,都遇到过类似"Warning: Cannot send session cookie – headers already sent…“或者”Cannot add/modify header information – headers already sent…"这样...
分类:
其他好文 时间:
2014-10-14 18:40:09
阅读次数:
126
PHP关于文件上传部分,特别提到表单隐藏域:MAX_FILE_SIZE,意思是接收文件的最大尺寸。文档中给出的例子如下:Send this file: 这 里设置MAX_FILE_SIZE = 30000,期待一种可能,使得浏览器在传送文件之前能够依此作出预先判断,如果文件尺寸大于30000字节,则...
分类:
其他好文 时间:
2014-10-14 11:36:08
阅读次数:
252
#!/usr/bin/env python#-*- coding:utf-8 -*-#File:mail_send.pyclass Mail_Logger(): mailLogger = None def __init__(self,conf_file,name): imp...
分类:
编程语言 时间:
2014-10-13 18:27:31
阅读次数:
167
当用户在系统相册,点击分享时,能通过我们自己的app,分享该图片。1.注册主要是在AndroidManifest.xml中,对activity注册Intent-filter,如:...
分类:
移动开发 时间:
2014-10-13 15:34:39
阅读次数:
196
一.expect实现自动填入密码1.vissh.exp.201#!/usr/bin/expectspawnssh-p20000oldboy@192.168.1.201/sbin/ifconfigeth0settimeout60expect"*password:"send"abcdef\n"expecteofexit2.chmod700ssh.exp.201#注。要是没有权限执行,也可以直接expect,700权限。防止其它用户查看脚本..
分类:
编程语言 时间:
2014-10-13 02:03:19
阅读次数:
287
先明确一个概念:每个TCP socket在内核中都有一个发送缓冲区和一个接收缓冲区,TCP的全双工的工作模式以及TCP的滑动窗口便是依赖于这两个独立的buffer以及此buffer的填充状态。接收缓冲区把数据缓存入内核,应用进程一直没有调用read进行读取的话,此数据会一直缓存在相应 socket的接收缓冲区内。再啰嗦一点,不管进程是否读取socket,对端发来的数据都会经由内核接收并且缓存到so...
分类:
其他好文 时间:
2014-10-12 19:24:08
阅读次数:
183