Skip to content

Instantly share code, notes, and snippets.

Avatar
😀
Researching on NLU + Voicebots!

Thiago Diogo thiagodiogo

😀
Researching on NLU + Voicebots!
View GitHub Profile
View ClientSocketThiago
public void iniciaCliente(){
try {
System.out.print("\nCliente tentando conectar com oservidor...");
client = new Socket(enderecoDoServidor, porta);
System.out.print("\n Conexão estabelecida...");
in = new DataInputStream((client.getInputStream()));
out = new DataOutputStream(client.getOutputStream());
//Enviando a hora agora (T1)
out.writeUTF(String.valueOf(System.currentTimeMillis()));
View gist:441503
public class Main {
public static void main(String args[]){
ServerSocketThiago server;
server = new ServerSocketThiago();
server.iniciaServidor();
System.out.println("Servidor iniciado");
ClientSocketThiago client;
You can’t perform that action at this time.