#include <string.h>#include <stdlib.h>#include <unistd.h>#include <ctype.h>#include <stdio.h>#include <sys/types.h>#include <sys/socket.h>#include <sys/stat.h>#include <netinet/in.h>#include <netdb.h>#include <pthread.h>#include "../sft.h"Go to the source code of this file.
Defines | |
| #define | _GNU_SOURCE |
| gcc -lpthread -o client client_msg.c | |
| #define | MSG_CLI 150 |
| #define | FONT "database.sft" |
Functions | |
| struct hostent * | gethostbyname () |
| int | gravar_mensagem (void) |
| int | ler_mensagens (void) |
| void * | menu () |
| void * | gerencia (void) |
| int | monta_pkt (char *aux) |
| Monta o pacote para envio de pacote. | |
| int | send_pkt_msg (struct sft_hdr *sft) |
| int | envia_mensagem () |
| int | cria_database (void) |
| Cria um banco de dados para o cliente. | |
| int | gera_menu (void) |
| int | main (int argc, char *argv[]) |
| Funcao principal do Cliente de mensagem. | |
Variables | |
| pthread_t | tid1 |
| pthread_t | tid2 |
| struct sockaddr_in | server |
| struct hostent * | hp |
| char | msg [TAMMSG] |
| FILE * | dtSft |
| int | id_msg = 0 |
| int | flag = 0 |
| int | tchau |
| int | id_send |
| #define _GNU_SOURCE |
Definition at line 6 of file client_msg.c.
| #define FONT "database.sft" |
Definition at line 32 of file client_msg.c.
| #define MSG_CLI 150 |
Definition at line 31 of file client_msg.c.
| int cria_database | ( | void | ) |
Definition at line 54 of file client_msg.c.
| int envia_mensagem | ( | ) |
| int gera_menu | ( | void | ) |
Definition at line 67 of file client_msg.c.
| void * gerencia | ( | void | ) |
| struct hostent * gethostbyname | ( | ) |
| int gravar_mensagem | ( | void | ) |
| int ler_mensagens | ( | void | ) |
Definition at line 278 of file client_msg.c.
| void * menu | ( | ) |
| int monta_pkt | ( | char * | aux | ) |
| aux | Mensagem a ser enviada. |
Definition at line 315 of file client_msg.c.

| int send_pkt_msg | ( | struct sft_hdr * | sft | ) |
| FILE* dtSft |
Definition at line 35 of file client_msg.c.
| int flag = 0 |
Definition at line 39 of file client_msg.c.
| struct hostent* hp |
Definition at line 27 of file client_msg.c.
| int id_msg = 0 |
Definition at line 38 of file client_msg.c.
| int id_send |
Definition at line 39 of file client_msg.c.
| char msg[TAMMSG] |
Definition at line 30 of file client_msg.c.
| struct sockaddr_in server |
Definition at line 26 of file client_msg.c.
| int tchau |
Definition at line 39 of file client_msg.c.
| pthread_t tid1 |
Definition at line 22 of file client_msg.c.
| pthread_t tid2 |
Definition at line 22 of file client_msg.c.
1.7.1