Cliente.java
Categorías: CategoryJava | CategoryProgramacion |
1 /**
2 *@author Elkin Andrey Garzón Alarcón...Geek Master
3 *@author Ingrid Lorena Guerrero Mayorga...
4 *@author Jefferson Fabian Idarraga Idarraga Pinilla...
5 */
6 package pinguinogg;
7
8 import java.io.*;
9 import java.net.*;
10 /*
11 *La clase que determina el derecho d cliente ´para poder jugar
12 */
13 public class Cliente {
14
15 public static final int puerto = 9999;
16
17 /*
18 *Se determina el socket puerto de salida en el localhots
19 */
20 public static void main(String[] args) throws IOException{
21 Socket socket;
22 PrintStream salida;
23 String mensaje;
24 /**Lee el teclado de como buffer de server xD*/
25 BufferedReader teclado = new BufferedReader(new InputStreamReader(System.in));
26 /**Permite la conecciona con el servidor */
27 socket = new Socket("localhost", puerto);
28 salida = new PrintStream(socket.getOutputStream());
29 salida.println("Hola Mundo");
30 socket.close();
31 }
32 }
