p2p

Does WCF supports Peer-to-peer implementation?

99封情书 提交于 2019-12-06 08:00:03
问题 I'm trying to implement peer-to-peer messaging and file sharing utility within LAN, So does WCF supports p2p? Does any one tried file sharing trough WCF? 回答1: Yes, it does. Please see How To Design State Sharing In A Peer Network: When researching the various ways in which an election scenario might be implemented, I discovered that there is an attribute in WCF that allows you to indicate the maximum number of hops that a particular message will travel. After seeing this, it became obvious

Client/Peer communication with Wi-Fi Direct on Android

不想你离开。 提交于 2019-12-06 07:18:26
问题 I have three Android devices: A, B, and C. They are connected via Wi-Fi Direct (assuming B is the group owner). I just have two questions: Can B connect as a client to another Wi-Fi Direct group? Can A or C connect as a client to another Wi-Fi Direct group? 回答1: I've tested your issues 2 days ago. B can connect to device D only if D isn't the owner of some group, and therefore D will be joined to B's group as a client. When A/C are connected to B as clients, when they'll try to send a

How can I receive data with a peerJS peer to peer connection?

白昼怎懂夜的黑 提交于 2019-12-06 04:17:52
I'm trying to connect two peers using peerJS. I am pretty much just following through their "Getting Started" but I am still struggling. Below is the code that I have gotten so far. <body> <script src="http://cdn.peerjs.com/0.3/peer.min.js"></script> <script> var conn; var peer = new Peer({key: 'lwjd5qra8257b9'}); peer.on('open', function(id){ console.log('My peer ID is:' + id); document.getElementById('peerIdDisplay').innerHTML = '<b>My peer ID is: </b><font color="red">' + id + '</font>'; }); function ConnectToPeer() { var peerId = document.getElementById("peerIdTxtBox").value; console.log

C# P2P chat application design

天大地大妈咪最大 提交于 2019-12-05 22:48:35
I want to create a simple chat application that doesn't use an explicit server. The main requirement is that the user can simultaneously chat with many friends (just like on Skype etc.). I do not mean a conference chat here, just multiple separate chat-windows. Currently, I want only a LAN messaging application but I'd appreciate, if the design was easy to extend to Internet connections. I wonder what design is appropriate for such an application. What do you think about a solution, where each user app has a TcpListener (the implicit server) and multiple TcpClient objects - one for each friend

Is it possible to connect a socket between two mobile devices (iPhones) over the internet?

蹲街弑〆低调 提交于 2019-12-05 18:14:57
问题 Is it possible to connect a socket between two mobile devices (iPhones) over the internet? I am trying to discover the IP of each device and connect directly. I know it can be done with Bonjour but that only works on local networks. I need a high speed connection between two devices over the internet. Thanks. 回答1: If you had both the IP's and they were both routable, it should be possible. I'm not sure though if the IP's given out by the 3G network are routable. If you are using WIFI, the IP

How does the bitcoin client determine the first IP address to connect?

旧巷老猫 提交于 2019-12-05 15:52:13
In my knowledge, bitcoin is a p2p protocol and a p2p protocol must have a dedicated central server . But it is said that bitcoin is decentralized . Back in 2009 we relied on IRC to bootstrap the network, so every node would connect to Freenode (later LFnet) and would join a channel. Their nicknames were their encoded public IP address. Nowadays the Bitcoin Core client, and many other implementations, rely on DNS seeds. DNS seeds are special DNS servers that are configured to return a number of randomly selected nodes from the network. The operators of the DNS seeds also run crawlers to

What is hyperdrive and how is that different from dat?

*爱你&永不变心* 提交于 2019-12-05 15:44:10
问题 I've been trying to get into dat recently and I'm wondering about the difference between dat and the hyperdrive module. 回答1: TL;DR: Dat is for end users and Hyperdrive for developers. Dat is a user friendly interface for sharing distributed files. Anyone can download the program and use it to securely share files peer-to-peer. Under the hood it uses Hyperdrive which is a Node.js package that aims to implement the same APIs as Node.js' core fs module, but it also offers data replication

Hole punching using STUN

為{幸葍}努か 提交于 2019-12-05 14:22:59
I'm currently trying to send UDP messages over the internet and have to set up the firewalls for both endpoints A and B (which are both behind a NAT). To do this, I want to use hole punching using a STUN server. When A creates a request to the STUN server (say, private: 85.1.1.12:6000 and public: 173.194.78.127:19302) I get 85.1.1.12:6000 as a response. If I were to send a packet from the same origin configuration (same origin ip and port that were used for the STUN-request) to any other destination address (the destination port stays the same) then my NAT would change the public port again

什么是区块链关键技术?掌握区块链需要哪些必备技能?

ε祈祈猫儿з 提交于 2019-12-05 13:51:33
一、区块链简介 简单地说,区块链就是一种去中心化的分布式账本数据库。去中心化,即与传统中心化的方式不同,这里是没有中心,或者说人人都是中心;分布式账本数据库,意味着记载方式不只是将账本数据存储在每个节点,而且每个节点会同步共享复制整个账本的数据。同时,区块链还具有去中介化、信息透明等特点。 二、区块链的关键技术 1. 点对点分布式技术(P2P): 点对点技术(peer-to-peer, 简称P2P)又称对等互联网络技术,它依赖网络中参与者的计算能力和带宽,而不是把依赖都聚集在较少的几台服务器上。P2P 技术优势很明显。点对点网络分布特性通过在多节点上复制数据,也增加了防故障的可靠性,并且在纯P2P网络中,节点不需要依靠一个中心索引服务器来发现数据。在后一种情况下,系统也不会出现单点崩溃。 2. 非对称加密技术:非对称加密(公钥加密)指在加密和解密两个过程中使用不同密钥。在这种加密技术中,每位用户都拥有一对钥匙:公钥和私钥。在加密过程中使用公钥,在解密过程中使用私钥。公钥是可以向全网公开的,而私钥需要用户自己保存。这样就解决了对称加密中密钥需要分享所带来的安全隐患。非对称加密与对称加密相比,其安全性更好:对称加密的通信双方使用相同的秘钥,如果一方的秘钥遭泄露,那么整个通信就会被破解。而非对称加密使用一对秘钥,一个用来加密,一个用来解密,而且公钥是公开的,秘钥是自己保存的

网络协议-P2P协议

帅比萌擦擦* 提交于 2019-12-05 11:24:15
网络协议-P2P协议 HTTP协议下电影为啥会很慢? FTP协议下电影为啥那么块? FTP文件传输协议 采用两个TCP 连接来传输一个文件。 控制连接:服务器端被动连接,端口是21,由客户端发起。命令从客户端传给服务器,服务器传回的应答。 常见命令:list 获取目录、reter 取文件、store 存文件。 数据连接:当每一个文件在客户端与服务器之间传输时,就创建一个数据连接。 FTP 的两种工作模式 主动模式:主动是相对于服务端来说的。 客户端要先建立控制连接,它随机打开一个大于1024的端口N,与服务器的21端口连接,并告诉服务端,数据连接的端口是N+1。 服务端主动将自己的数据端口20,与客户端的N+1端口连接,构成数据连接。 被动模式:被动也是相对于服务端来说的。 客户端打开两个大于1024的端口,N和 N+1。客户端的N端口与服务端的21连接,发一个PASV 命令,服务端接到命令后打开一个大于1024的端口P,返回“227 entering passive mode”消息,这个消息里有服务端的数据连接端口。 客户端N端口接到服务端的消息后,将N+1端口连接服务器的端口P,构建数据连接。 FTP有个缺点就是单一服务器的带宽有限。因为它使用传统的客户端、服务器的方式。服务器集群的方式本质是一样的。也不是最好的解决办法。 P2P 是什么 P2P 就是 peer-to-peer