• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

Recommended Posts





公共静态void main(String[] args) {

try(server socket server=new server socket(8080)){//在端口8080上创建服务器。


socket socket=server . accept();//没有客户端连接时,线程会一直阻塞,直到有客户端连接。

System.out.println('客户端连接,IP地址为:' socket.getinet address()。gethostaddress()));

}catch (IOException e){

e . printstacktrace();




公共静态void main(String[] args) {

try(Socket Socket=new Socket(' localhost ',8080)){


}catch (IOException e){


e . printstacktrace();



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now