简体   繁体   English

通过插座连接到远程系统

[英]Connect to remote system through socket

Am trying to connect to a remote system which is not in the same local area as mine through java sockets, can anyone share some sample code or docs to do so. 我试图通过java套接字连接到与我的本地区域不在同一个本地区域的远程系统,任何人都可以共享一些示例代码或文档来这样做。

I have created a server socket and is listening for connection at a port.how can i connect to that socket from my client program that is not in the same local area network as the server. 我已经创建了一个服务器套接字并正在侦听端口上的连接。如何从我的客户端程序(与服务器不在同一局域网中)连接到该套接字。

Thanks in advance.. 提前致谢..

http://www.oracle.com/technetwork/java/socket-140484.html提供了连接套接字的服务器和客户端示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM