1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
package web;
import java.net.*;
import java.io.*;
public class Client {
static Socket s;
public static void main (String [] args ) throws IOException
{
s=new Socket("192.168.8.24",60001);
// FileInputStream inf=new FileInputStream(new File("D:\\serveur.txt"));
FileOutputStream fos=new FileOutputStream("D:\\serveur.txt");
// ObjectOutputStream out=new ObjectOutputStream(s.getOutputStream());
byte buf[] = new byte[1024];
int n;
// while((n=inf.read(buf))!=-1){
// out.write(buf,0,n);
s.close();
}
// inf.close();
// out.close();
} |
Partager