/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package test_serwer;

/**
 *
 * @author rafal
 */

import java.io.*;
import java.net.*;

public class Klient
{
public static void main(String[] args)
{
Socket socket;
InetSocketAddress address;
 try {
     socket= new Socket();
     address = new InetSocketAddress("localhost", 6767);
     socket.connect(address);
    
     System.out.println("Polaczenie nawiazane");

    DataOutputStream out;
    OutputStream out_sock;
    out_sock = socket.getOutputStream();
    out = new DataOutputStream (out_sock);
    out.writeInt(87);
    
    socket.close();
    }
 catch (Exception e)
     {
     System.out.println(e);
     }
 }
}