UDR rsync
1、
SOCK_DGRAM UDP packets
SOCK_STREAM TCP
不同的协议下的 套接字 数据包
面向数据的
面向连接的
套接字
2、
数据 UDP
文件 TCP
https://www.quora.com/Whats-the-difference-between-SOCK_RAW-and-SOCK_STREAM
Basically SOCK_DGRAM is used for UDP packets, SOCK_STREAM for TCP. As far as reliability issues, it's UDP vs. TCP issues - no guarantee for UDP, guaranteed delivery for TCP.
SOCK_STREAM for data streaming and SOCK_DGRAM for messaging. Note that UDT sockets are connection oriented in all cases.
https://github.com/LabAdvComp/UDR/blob/49ca8b5ab63b46c835c6d90ffc5ab4f1bf26ea0c/udt/doc/doc/socket.htm
https://github.com/LabAdvComp/UDR/blob/49ca8b5ab63b46c835c6d90ffc5ab4f1bf26ea0c/udt/src/core.h
static UDTSOCKET socket(int af, int type = SOCK_STREAM, int protocol = 0);
https://github.com/LabAdvComp/UDR/blob/49ca8b5ab63b46c835c6d90ffc5ab4f1bf26ea0c/udt/src/core.cpp
if ((UDT_STREAM == m_iSockType) && (m_pRcvBuffer->getRcvDataSize() > 0))
s_UDTUnited.m_EPoll.enable_read(m_SocketID, m_sPollID);
else if ((UDT_DGRAM == m_iSockType) && (m_pRcvBuffer->getRcvMsgNum() > 0))
s_UDTUnited.m_EPoll.enable_read(m_SocketID, m_sPollID);
https://stackoverflow.com/questions/5815675/what-is-sock-dgram-and-sock-stream
TCP almost always uses SOCK_STREAM and UDP uses SOCK_DGRAM.
TCP/SOCK_STREAM is a connection-based protocol. The connection is established and the two parties have a conversation until the connection is terminated by one of the parties or by a network error.
UDP/SOCK_DGRAM is a datagram-based protocol. You send one datagram and get one reply and then the connection terminates.
If you send multiple packets, TCP promises to deliver them in order. UDP does not, so the receiver needs to check them, if the order matters.
If a TCP packet is lost, the sender can tell. Not so for UDP.
UDP datagrams are limited in size, from memory I think it is 512 bytes. TCP can send much bigger lumps than that.
TCP is a bit more robust and makes more checks. UDP is a shade lighter weight (less computer and network stress).
Choose the protocol appropriate for how you want to interact with the other computer.
UDR rsync的更多相关文章
- rsync 笔记之 list
通过 rsync --list-only 可以列出可用的 文件/目录或者 module 下面两者的含义是完全不同的: rsync --list-only root@192.168.4.140: 使用系 ...
- 配置rsync服务,数据同步。
这部分设计服务器端和客户端. [服务器端] 如果服务器没有安装rsync服务则使用yum安装rsync服务. yum install rsync 然后 vim /etc/xinetd.d/rsync ...
- 使用rsync同步目录
本文描述了linux下使用rsync单向同步两个机器目录的问题. 使用rsync同步后可以保持目录的一致性(含删除操作). 数据同步方式 从主机拉数据 备机上启动的流程 同步命令: rsync -av ...
- linux rsync配置文件参数详解
一.全局参数 在[moudle]之前的参数都是全局参数,也可以在全局参数下定义部分模块参数,这时该参数的值就是所有模块的默认值. port:指定后台程序使用的端口号,默认是873 logfile:指定 ...
- inotify+rsync实现实时同步部署
1.1.架构规划 1.1.1架构规划准备 服务器系统 角色 IP Centos6.7 x86_64 NFS服务器端(NFS-server-inotify-tools) 192.168.1.14 Cen ...
- rsync同步架构
1.1 rsync服务器端配置 1.1.1 查看服务器端rsync版本 1.1.2 创建配置文件 默认安装好rsync程序后,并不会自动创建rsync的主配置文件,需要手工来创建,其主配置文件为“/e ...
- rsync同步
本地同步: rsync -avz /boot /test C/S架构: 远程同步:rsync+ssh 远程浏览器目录文件:rsync 用户@192.168.0.250:/boot 下行:rsync ...
- 使用rsync+inotify同步两台服务器文件
目标功能:将B服务器文件同步到A服务器 A服务器rsyncd.conf配置 权限600 A服务器rsyncd.pas文件配置 权限600 同步文件路径 /data/wwwroot/shen/ 权限 ...
- 通过rsync+inotify实现数据的实时备份
我讲到过利用rsync实现数据的镜像和备份,但是要实现数据的实时备份,单独靠rsync还不能实现,本文就讲述下如何实现数据的实时备份. 一.rsync的优点与不足 与传统的cp.tar备份方式相比,r ...
随机推荐
- vue-resource和vue-axios的简单使用方法
两者其实差别不大,都是基于es6的Promise对象实现的方法 vue-resource: main.js => import Vue from 'vue'; import VueResourc ...
- 【PHP代码审计】 那些年我们一起挖掘SQL注入 - 1.什么都没过滤的入门情况
0x01 背景 首先恭喜Seay法师的力作<代码审计:企业级web代码安全架构>,读了两天后深有感触.想了想自己也做审计有2年了,决定写个PHP代码审计实例教程的系列,希望能够帮助到新人更 ...
- iOS开发--tarBarItem右上方显示badgeValue
直接设置tabBarItem.badgeValue没有效果,找原因半天发现ViewController被NavigationViewController包着 需这样设置才行: self.navigat ...
- (转)作为一个新人,怎样学习嵌入式Linux?(韦东山)
被问过太多次,特写这篇文章来回答一下. 在学习嵌入式Linux之前,肯定要有C语言基础.汇编基础有没有无所谓(就那么几条汇编指令,用到了一看就会).C语言要学到什么程度呢?越熟当然越好,不熟的话也 ...
- Popupwindow全屏问题
//sdk > 21 解决 标题栏没有办法遮罩的问题 popupWindow.setClippingEnabled(false);
- 安装win7到移动硬盘
jpg改rar http://www.360doc.com/content/16/0816/10/19373891_583556875.shtml
- 如何在浏览器中简单模拟微信浏览器(仅限于通过User Agent进行判断的页面)
模拟微信浏览器: .打开360极速 .F12开发者工具 .开发者模式左上方有一个手机样子的图标 点击进入 设备模式‘ .将UA选项中的字符串替换成: Mozilla/ 备注: 替换的字符串是微信浏览器 ...
- 【读书笔记-数据挖掘概念与技术】数据仓库与联机分析处理(OLAP)
之前看了认识数据以及数据的预处理,那么,处理之后的数据放在哪儿呢?就放在一个叫“数据仓库”的地方. 数据仓库的基本概念: 数据仓库的定义——面向主题的.集成的.时变的.非易失的 操作数据库系统VS数据 ...
- Windows server 创建FTP 包括ftp的账号密码设置
原始文章 : https://blog.csdn.net/missingshirely/article/details/50767043 最近要做个FTP上传资源的工具,以前都是我提供目录,由公司网管 ...
- 【大数据系列】hadoop上传文件报错_COPYING_ could only be replicated to 0 nodes
使用hadoop上传文件 hdfs dfs -put XXX 17/12/08 17:00:39 WARN hdfs.DFSClient: DataStreamer Exception org.ap ...