How standard TCP/IP concepts map to their JXTA equivalents

本文探讨了JXTA对等网络中P2P Sockets的实现方式,包括主机名、IP地址和服务端口等核心概念的支持情况,并讨论了特定功能如多播套接字和UDP套接字的支持状态。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


TCP/IP Concept


Example


Standard TCP/IP Implementation


JXTA P2P Sockets Implementation



host name/domain name



www.foo.com



DNS tables record a mapping between a given host name and a given IP address. Clients contact a DNS server, resolve the domain name into an IP address, and then directly contact the IP address.


Supported. Peers who wish to start a server publish a JXTA peer group advertisement with the Name field set to the domain name they want. Peers who want to contact this host search for a JXTA peer group advertisement with the given host name, and then join the peer group found.


IP address


23.66.76.44


IANA hands out top-level IP network addresses. Network administrators then hand out IP addresses to machines on their own network using the network addresses as a base address.


Supported. IP addresses are automatically generated by hashing the host name into a 4 byte IP address, such as hashing www.nike.laborpolicy into 56.33.64.89. The special bytes 255, 0, and 127 are not allowed in hashed IP addresses. The IP address of a host is published along with the host name when a JXTA peer group advertisement is published for that host. Clients who wish to contact a given IP address search for a JXTA peer group advertisement with the IP address, then join that peer group when it is found.


service port


80


Clients use TCP or UDP along with the IP protocol to directly contact the service port for a given endpoint..


Supported. Server peers publish JXTA pipe advertisements with the Name field set to the port number, such as 80 inside of the JXTA peer group for the given host. A client must first find the host's JXTA peer group and then join it. They then search for a JXTA pipe advertisement with the given service port number. After finding it, a TCP like channel is created using a JXTA pipe that is bidirectional.


loopback address


127.0.0.1/"localhost"


An address that is not physically connected to any network. Used for debugging and starting up servers on the localhost.


Supported, but incorrectly. We simply expose the address as an "Any" address. This means that P2P server sockets started with the loopback interface are exposed on the network using their local peer information to start the server; being exposed on the network is an incorrect way of implenting the loopback interface and will be addressed in a future release.


"Any" address


0.0.0.0


Use any IP address that the current machine is configured for.


Supported. Every peer automatically has a &auot;Any" host name generated from their JXTA peer name. For example, if a peer has a JXTA peer name of BradGNUberg, then their automatic any host name is www.BradGNUberg.peer. An IP address is hashed from this host name.


Context for resolving domain names/IP Addresses


 


On the Internet almost all IP addresses (except for private IP addresses) and most domain names are visible.


Supported. All P2P Socket IP addresses and host names are resolved in an application peer group that is set before creating sockets or server sockets. Different applications using P2P Sockets will not be able to reach each other if they resolve all P2P IP and host name information in different peer groups.


Multicast Sockets/IP Addresses


 


 


Not Supported


UDP Sockets


 


 


Not Supported


Multi-homed hosts


 


 


Not Supported


Private IP Addresses


192.168.x.x


Indicates that a given IP address is only valid on a private network and is not exposed or resolvable on the global Internet.


Not directly supported, but is simulated by creating your own scoped JXTA peer group.


Socket Options


SoLinger, TcpNoDelay, etc.


Used to control various TCP/IP-level settings on the socket and server socket


Not supported, except for SoTimeout, which is untested.


Non-blocking IO Sockets/Server Sockets


 


Used to create scalable servers that do not block while waiting for IO communication.


Not supported.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值