0
FileOutputStream fos = new FileOutputStream(fileName);
InputStream is = clientSocket.getInputStream();
while ((readBytes = is.read()) != -1)
{
fos.write(readBytes);
System.err.println(readBytes);
}
System.err.println(readBytes);
clientSocket.shutdownOutput();
fos.close();
System.out.println("Trans complete");
클라이언트가 -1 전송 자바 EOF를받을 수 있지만, 서버는 수신 할 수없는 -1서버는
가 어떻게 모든 파일을받을 수 있나요?
서버 코드는 어디에 있습니까? –
clientSocket이란 무엇입니까? – PeterMmm
클라이언트가 -1을 보내는 것을 어떻게 알 수 있습니까? – m0skit0