客户端
import java.io.FileInputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.InetAddress;
import java.net.Socket;
public class Send {
public static void main(String[] args) throws IOException {
//创建Socket对象
Socket s = new Socket("ip地址",端口);//这里的ip地址和端口号要替换为具体的
//获取输出流,写数据
OutputStream os = s.getOutputStream();