进阶day11-网络编程_TCP多线程lambda方式文件上传的实现
This commit is contained in:
@@ -17,7 +17,7 @@ import java.net.Socket;
|
||||
public class TcpUploadClientDemo07 {
|
||||
public static void main(String[] args) throws IOException {
|
||||
//1.创建字节输入流读取图片的字节数据
|
||||
FileInputStream fis = new FileInputStream("4.jpg");
|
||||
FileInputStream fis = new FileInputStream("1.jpg");
|
||||
//2.创建客户端对象指定服务器的IP和端口
|
||||
Socket client = new Socket("192.168.22.51", 10002);
|
||||
OutputStream os = client.getOutputStream();//发送请求数据
|
||||
|
||||
Reference in New Issue
Block a user