?? cl.java
字號:
// test of the client class// Keith Vertanen, 11/98import java.io.*;import java.net.*;import Client;public class cl { static int SIZE = 1024; // how big the array of data is static int ITERS = 20; // how many messages to bounce back and forth public static void main( String args[] ) throws IOException { // connect to the server, first number is the port, second // is the system name, third is whether you want reversed // bytes or not Client myclient = new Client(5007, "bee12.cs.orst.edu", 1); System.out.println(myclient.recv_string('\n')); myclient.send_string("We read you 5 by 5\n"); double C[]; C = new double[SIZE]; for (int i=0; i<SIZE; i++) C[i] = 0.0; for (int i=0; i<ITERS; i++) { myclient.recv_doubles(C, SIZE); myclient.send_doubles(C, SIZE); System.out.print(i+" "); } myclient.closesocket(); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -