?? clientsend.java
字號:
package test;
import java.io.*;
import java.net.*;
import test.*;
public class ClientSend
{
private Socket socket;
private OutputStream os;
public ClientSend(Socket socket)
{
try
{
this.socket = socket;
this.os = this.socket.getOutputStream();
}
catch(Exception e)
{
e.printStackTrace();
}
}
public void send(int x1, int y1, int x2, int y2) throws Exception
{
String sendline = x1+","+y1+","+x2+","+y2;
int k = sendline.length();
for(int i=0; i<k; i++)
{
sendline+= " ";
}
byte b[] = new byte[20];
b =sendline.getBytes();
os.write(b, 0, 20);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -