p2p

How do I make a TCP server work behind a router (NAT) without any redirection configuration needed

对着背影说爱祢 提交于 2019-11-28 08:32:21
The scenario is the following. I have two machines A and B: A: Client (behind NAT) B: Server (behind NAT) I want B to be able to listen on any given port, so that A can send packets to B through that specific TCP port and receive any response. If both machines are not behind a NAT it is pretty straight foward process. However how do I make it work so that it works even when B is behind a router, without him having to go change the router configuration enable some port forwarding etc... For example, how do peer-to-peer programs like torrent clients work without the user having anything to

What techniques are available to do P2P in the browser? [closed]

天涯浪子 提交于 2019-11-28 05:59:41
What options does a web developer currently have for implementing client-side peer-to-peer systems in the web browser? Some hypothetical examples might be a file-sharing service that bypasses the web-server after clients find eachother, or a chat service. What I know about: the site chatroulette uses some flash technology as discussed here . And I am also aware of Opera Unity which extends the browser model to encompass both a client and a server, as well as this firefox plugin which works similarly I also just came across this blog post related to the Joose js framework, but am not yet sure

Android P2P (direct-connection) over the Internet (behind NAT)

我只是一个虾纸丫 提交于 2019-11-28 05:58:47
I'm starting a small project, basically a multiplayer (as in more than two players) variation of the classic Battleship game. One problem that I'm trying to resolve before I dive into coding is the problem of communication between the multiple players. A current possibility is to use a central HTTP server as the central hub for communication (coupled with the Android C2DM API to allow push communication from the HTTP server to the devices). This seems a nice solution, because in theory as long as you have access to the Internet it should work perfectly, whether you are behind a NAT or not.

Is it possible to set up a socket.io client running (server-side) on a node.js server?

一曲冷凌霜 提交于 2019-11-28 04:43:29
I'd like to enable socket-based p2p communications between two or more different node.js application servers. I'm using socket.io to handle all such communication between a given server and the web application it serves - but what I'm looking for is a way to communicate server-to-server. I had initially assumed it would be as easy as something like this: var io = require("socket.io"); var socket = io.connect("my remote endpoint"); However, as it turns out the server-side socket.io implementation doesn't offer a "connect" method, only a listen method. Why is this? Why can't I treat a node

NAT translation not working from inside the network (hairpin condition)

吃可爱长大的小学妹 提交于 2019-11-28 00:24:26
I'm writing a P2P application. Peers regularly ping a main server to update their current IP/port, so when a peer wants to reach another one it can ask the server for that information. For now peers use UPnP to configure the NAT (for classic home setups) to be accessible from outside. So everything works, except when a peer's client tries to reach another (or the same) peer's server and both are behind the same NAT. Since in that case the client is trying to reach its own "external" (public) IP address from behind the NAT, the NAT doesn't do the port forwarding and is unable to route the IP

.NET and P2P - writing a P2P messenger

邮差的信 提交于 2019-11-27 20:35:57
问题 Does anyone have any advice how to write such app? Or maybe knows some nice tutorial? I would like to use System.Net.PeerToPeer namespace, but everything I can find about it is MSDN which I can't read without getting mad. Or maybe using "old-school" TCP/IP would more efficient? I will appreciate every piece of advice. Every sample code I will shower with gold ;) And please, don't send me back to Google for I have searched for a long time for sth useful - maybe inaccurately but time is running

How to transmit live video over a Socket using Flex / ActionScript 3?

空扰寡人 提交于 2019-11-27 18:40:52
问题 My Requirements are similar to this old question of 2009. I am just re-posting since OP is kind of 2 years old and the question is closed now. How can I transmit live video Stream over a Socket using Flex / ActionScript 3.0 ? I am developing an application which works on P2P architecture so I cant use FMS for live media streaming. I have read about NetConnection and NetStream classes but cant start using them since all the examples are using FMS. How I do this ? Secondly, I also need a

Peer-to-Peer communication options

眉间皱痕 提交于 2019-11-27 17:53:30
can anybody confirm what are the currently allowed methods for peer-to-peer communications within the Android framework? I need to transfer json strings and I'm currently using SMS which works ok but the problem is that the data also ends up as lots of text messages. I've read Reto Meier's first edition of Professional Android Application Development where he says that the data transfer options were not implemented due to security concerns. Has this changed at all and how would you do peer-to-peer transfer of data? Ollie C Have you looked at Qualcomm's AllJoyn library ? It is designed to work

局域网下的P2P内容路由网络项目——(一:一致性HASH算法)

时间秒杀一切 提交于 2019-11-27 16:11:40
本文只是为了给自己定一个开始,最终的目是实现一个内网环境下的真实的p2p网络。具体相关涉及到的理论和算法原理后面会慢慢补充,也希望通过这个小的项目能使自己对P2P和分布式系统有一个初步形象的认识,望共勉! 源码文件 murmurhash3.h #ifndef _MURMURHASH3_H_ #define _MURMURHASH3_H_ #include <stdint.h> /* * MurMurHash算法,是非加密HASH算法,性能很高, * 比传统的CRC32,MD5,SHA-1(这两个算法都是加密HASH算法,复杂度本身就很高,带来的性能上的损害也不可避免) * 等HASH算法要快很多,而且这个算法的碰撞率很低. * http://murmurhash.googlepages.com/ * 参数seed:种子,最好用一个质数 */ uint32_t murmur3_32(const char *key, uint32_t len, uint32_t seed = 17); #endif murmurhash3.cpp #include "murmurhash3.h" uint32_t murmur3_32(const char *key, uint32_t len, uint32_t seed) { static const uint32_t c1 =

Is there a clearly documented consensus in plain English that describes Maymounkov and Mazieres Kademlia system?

我的未来我决定 提交于 2019-11-27 15:50:25
I am struggling with the original paper trying to understand seemingly contradicting paragraphs. One example is where in 2.2 the authors declare that for bit space 160 there will be 160 k buckets, then later go on to say that in fact the buckets are a smaller number covering wider bit ranges and organized by prefix binary trees. In that 2.4 section they talk about unbalanced trees that lead to interpretations like the following, https://stackoverflow.com/a/32187456/442396 , where it is not clear if the answer there does reflect MMs intentions. Is there a clearly documented consensus out there