Shenzhou 2070 notebook computing power
Publish: 2021-04-25 14:30:15
1. Player country Musketeer 2S, I am also paying attention
2. 服务器端:
public class Server{
public static void main(String[] args){
ServerSocket ss = new ServerSocket(端口号);
Socket s = ss.accept();
BufferedReader br = new BufferedReader(new InputStreamReader(s.getInputStream()));
String str = br.readLine();
System.out.println(str);
br.close();
s.close();
ss.close();
}
}
客户端:
public class Client{
public static void main(String[] args){
Socket s = new Socket(ip,端口)
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));
bw.write("hello");
bw.flush();
bw.close();
s.close();
}
}
先启动服务器端在启动客户端,两个端口要一致,如果是同一台电脑的ip可写为"127.0.0.1"
public class Server{
public static void main(String[] args){
ServerSocket ss = new ServerSocket(端口号);
Socket s = ss.accept();
BufferedReader br = new BufferedReader(new InputStreamReader(s.getInputStream()));
String str = br.readLine();
System.out.println(str);
br.close();
s.close();
ss.close();
}
}
客户端:
public class Client{
public static void main(String[] args){
Socket s = new Socket(ip,端口)
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));
bw.write("hello");
bw.flush();
bw.close();
s.close();
}
}
先启动服务器端在启动客户端,两个端口要一致,如果是同一台电脑的ip可写为"127.0.0.1"
3. Just write a simple server and customer service side. I wrote a very simple one, which can only communicate with one server on one client. Under the console input, this is the server import Java. IO *< br />import java.net.*;< br />import java.util.Scanner; public class Server
{
public static void main(String[] args)
{
try {
ServerSocket server=new ServerSocket(8888);// Define the port number of the client
socket client = server. Accept()// Define a socket object
InputStream is = client. Getinputstream()// The server accepts the information input stream, that is, the message sent from the server segment
BufferedReader br = new BufferedReader (New inputstreamreader (is))// Use BufferedReader to wrap the input stream
OutputStream OS = client. Getoutputstream()// This is the output stream used to send messages to the server
printstream PS = new printstream (OS)< br /> Scanner scanner=new Scanner(System.in);// Input the string
boolean flag = true from the keyboard// Define a dead loop to let the server continuously accept the string
while (flag)
{
string s = br. Readline(), which is sent from the client// S is the string
system. Out. Println (s) received from the client< br />
String s2=scanner.nextLine();// S2 is the string
ps.println (S2) written to the client// Send your writing to the client
}
client. Close()
} catch (IOException E) {/ / try and catch you don't care, this is used to handle exceptions, that is, fixed format
e.printstacktrace()
}
}
} below is the client import Java. Io< br />import java.net.*;< br />import java.util.Scanner; public class Client
{ public static void main(String[] args)
{
try
{
Socket client=new Socket(" 192.168.--.--", 8888);// The IP address is a string, and the port number is an integer. The port number should be the same as the one you wrote before, as well as the IP address. Write the IP address of your machine
InputStream is = client. Getinputstream()// The functions of the two streams here are similar to those of the server above
BufferedReader BF = new BufferedReader (New inputstreamreader (is))< br />
OutputStream os=client.getOutputStream(); < br /> PrintStream ps=new PrintStream(os);< br /> Scanner scanner=new Scanner(System.in);< br /> boolean flag=true;
while (flag) / / this sentence allows the client to keep talking
{
public static void main(String[] args)
{
try {
ServerSocket server=new ServerSocket(8888);// Define the port number of the client
socket client = server. Accept()// Define a socket object
InputStream is = client. Getinputstream()// The server accepts the information input stream, that is, the message sent from the server segment
BufferedReader br = new BufferedReader (New inputstreamreader (is))// Use BufferedReader to wrap the input stream
OutputStream OS = client. Getoutputstream()// This is the output stream used to send messages to the server
printstream PS = new printstream (OS)< br /> Scanner scanner=new Scanner(System.in);// Input the string
boolean flag = true from the keyboard// Define a dead loop to let the server continuously accept the string
while (flag)
{
string s = br. Readline(), which is sent from the client// S is the string
system. Out. Println (s) received from the client< br />
String s2=scanner.nextLine();// S2 is the string
ps.println (S2) written to the client// Send your writing to the client
}
client. Close()
} catch (IOException E) {/ / try and catch you don't care, this is used to handle exceptions, that is, fixed format
e.printstacktrace()
}
}
} below is the client import Java. Io< br />import java.net.*;< br />import java.util.Scanner; public class Client
{ public static void main(String[] args)
{
try
{
Socket client=new Socket(" 192.168.--.--", 8888);// The IP address is a string, and the port number is an integer. The port number should be the same as the one you wrote before, as well as the IP address. Write the IP address of your machine
InputStream is = client. Getinputstream()// The functions of the two streams here are similar to those of the server above
BufferedReader BF = new BufferedReader (New inputstreamreader (is))< br />
OutputStream os=client.getOutputStream(); < br /> PrintStream ps=new PrintStream(os);< br /> Scanner scanner=new Scanner(System.in);< br /> boolean flag=true;
while (flag) / / this sentence allows the client to keep talking
4. Both are OK... But the garbage collection mechanism of Java is automatic, so the efficiency of executing client program is very slow... It is generally used for server or web development... The focus of learning Java is to take J2EE technology as the core. Want to write the client and the like, using C language is the best.. but the memory processing mechanism is all written by themselves.. the difficulty is not generally high.
5. From Wuchang railway station, take no.593 (Fenghuo village wujiaotang) to Luxiang square. About 11.0 km
from Wuchang railway station, take No.518 (Wuchang railway station wangjiadian) to Luxiang. About 10.76 km
from Wuchang railway station, take No.59 (nanwangshan Jiangnan courtyard) to Luxiang. About 10.84 km
from Wuchang railway station, Take bus 510 (Wuchang railway station Dapeng Village) to Luxiang, about 10.87 km
from Wuchang railway station, take No.518 (Wuchang railway station wangjiadian) to Luxiang. About 10.76 km
from Wuchang railway station, take No.59 (nanwangshan Jiangnan courtyard) to Luxiang. About 10.84 km
from Wuchang railway station, Take bus 510 (Wuchang railway station Dapeng Village) to Luxiang, about 10.87 km
6. Even if the coin safety intelligent chain is trampled by different public chains, it seems that there is only one Ethereum that can achieve the result of coin safety intelligent chain, and the public chains of other exchanges have no name even if they are doing so. Coin safety intelligent chain should have run through in defi.
7. 58 to the waist embankment, then turn 728, get off at Donghu Development Zone Station, and walk a little ahead
8. Guanggu square subway station to China Guanggu science and Technology Exhibition Center
Metro Line 2 to Metro Line 11
Guanggu square
walk 10 meters
get on at Guanggu Square Station
Metro Line 2 (fozuling direction) station 5
get off at Guanggu railway station
Metro Line 11 (zuoling direction) station 6
get off at Guanggu No.6 station (exit C1)
step Travel 1.0KM
China Optical Valley Science and Technology Exhibition Center
Metro Line 2 to Metro Line 11
Guanggu square
walk 10 meters
get on at Guanggu Square Station
Metro Line 2 (fozuling direction) station 5
get off at Guanggu railway station
Metro Line 11 (zuoling direction) station 6
get off at Guanggu No.6 station (exit C1)
step Travel 1.0KM
China Optical Valley Science and Technology Exhibition Center
9. Take the end material to the backpack. Remember! It's in the backpack. Find the cat in exchange and order & quot; Starting with end material;, I'll hand it over from my pocket, and then I'll change all the end materials. Then press X. When you exit the dialog box, open the props bar before Mr. cat sits down, and you will find that the front end material is still in the bag, and the end material is sent to the props box. If you take some advanced boss materials and replace them with end materials, such as Lei Lanlong, Hong long, Xun long, Shan long, Yan Ge long, and then brush them according to the above methods, won't they
and after the village head's mission, he will give you an automatic defense 10 stone guard. If you take another unified gun, when you attack, the enemy's melee attack can be automatically defended
this is the screen of brush end material
and after the village head's mission, he will give you an automatic defense 10 stone guard. If you take another unified gun, when you attack, the enemy's melee attack can be automatically defended
this is the screen of brush end material
10. In the cat equipment shop, use the material to replace the end material. After each change, open the items on your body to see that the material is still there, and then circulate infinitely, and then sell the end material
Hot content
