Friday, March 19, 2010

Send and Receive files from remote system

Send and receive files from java socket programing

Sender :

1. Create a Scoket connection

ServerSocket servsock = new ServerSocket(13267);

2. Checks for the socket acceptence from socket client

Socket sock = servsock.accept();

3. Stream the file and output the stream

Receiver :

1. Create socket with sender ip address and port

Socket sock = new Socket("",13267);

2. Get the stream from the socket .

InputStream is = sock.getInputStream();

 Source Code

1 comment:

  1. hey buddy great work.
    i can't reach your source code. i think it is deleted or something, can you please upload the source code.
    thank you