Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

GlwClient.c File Reference

#include <windows.h>
#include <winsock2.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "NetCommon.h"
#include "port/Glw.h"
#include "Memory.h"
#include "debug.h"
#include "Net.h"
#include "Client.h"

Include dependency graph for GlwClient.c:

Include dependency graph

Go to the source code of this file.

Data Structures

struct  glw_Connection
struct  glw_Timer

Defines

#define SOCK_CLOSE_BUFSIZE   256

Functions

u32 glw_htonl (u32 value)
u32 glw_ntohl (u32 value)
int glw_Recv (u32 connection, u8 *buff, int bufflen)
int glw_Send (u32 connection, u8 *buff, int bufflen)
int glw_SendMsg (u32 connection, u8 type, u32 id, u8 *buff, int bufflen)
void glw_Client (char *address, int port)
int glw_ReadMessage (struct glw_Connection *conn)
int glw_MainLoopCli (u32 connection, u32 userdata)
LRESULT CALLBACK glw_StdWindowProc (HWND Window, UINT MessageType, WPARAM FirstParameter, LPARAM SecondParameter)
int WINAPI WinMain (HINSTANCE Instance, HINSTANCE PreviousInstance, LPSTR CommandLine, int CommandShow)
u32 glw_TimerStart (u32 window, u32 millisec, u32 userdata)
void glw_TimerCancel (u32 window, u32 id)
void glw_CloseApp (u32 connection)

Variables

char client_loopback [] = "127.0.0.1"
char * client_address = client_loopback
HWND global_window
glw_Connectionglobal_conn
int quit = 0
int async = 0
glw_Event curr_event


Define Documentation

#define SOCK_CLOSE_BUFSIZE   256
 

Definition at line 42 of file GlwClient.c.

Referenced by glw_Client.


Function Documentation

void glw_Client char *    address,
int    port
[static]
 

Definition at line 154 of file GlwClient.c.

References glw_Connection::byteorder, client_Init, debug_Begin, debug_End, mem_calloc, mem_free, mem_malloc, NET_WRITE_BUFFER_SIZE, NULL, glw_Connection::sd, SOCK_CLOSE_BUFSIZE, u32, and glw_Connection::write_buffer.

Referenced by WinMain.

void glw_CloseApp u32    connection
 

Definition at line 494 of file GlwClient.c.

References quit, and u32.

Referenced by client_SendCloseApp.

u32 glw_htonl u32    value
 

Definition at line 74 of file GlwClient.c.

References u32.

int glw_MainLoopCli u32    connection,
u32    userdata
 

Definition at line 309 of file GlwClient.c.

References async, glw_Connection::byteorder, client_CliProcessMessage, glw_Event::data, debug_Begin, debug_End, debug_Message, glw_Event::event, global_window, glw_Event::mousex, glw_Event::mousey, NULL, quit, glw_Connection::sd, u32, glw_Event::userdata, and glw_Event::window.

Referenced by client_CliSRq_CallGadgetTL, client_CliSRq_OpenWindowTL, and client_Init.

u32 glw_ntohl u32    value
 

Definition at line 79 of file GlwClient.c.

References u32.

int glw_ReadMessage struct glw_Connection   conn [static]
 

Definition at line 225 of file GlwClient.c.

References glw_SockMsg::body, glw_Connection::completed, glw_Event::data, glw_Event::event, glw_SockMsg::id, glw_SockMsg::length, mem_malloc, glw_Event::millis, NULL, glw_Connection::sd, glw_Event::second, glw_Connection::sockmsg, glw_SockMsg::type, and u32.

int glw_Recv u32    connection,
u8   buff,
int    bufflen
 

Definition at line 85 of file GlwClient.c.

References debug_Begin, debug_End, NULL, glw_Connection::sd, u32, and u8.

int glw_Send u32    connection,
u8   buff,
int    bufflen
 

Definition at line 103 of file GlwClient.c.

References debug_Begin, debug_End, NULL, glw_Connection::sd, u32, and u8.

int glw_SendMsg u32    connection,
u8    type,
u32    id,
u8   buff,
int    bufflen
 

Definition at line 121 of file GlwClient.c.

References debug_Begin, debug_End, NET_WRITE_BUFFER_SIZE, NULL, glw_Connection::sd, u32, u8, and glw_Connection::write_buffer.

LRESULT CALLBACK glw_StdWindowProc HWND    Window,
UINT    MessageType,
WPARAM    FirstParameter,
LPARAM    SecondParameter
 

Definition at line 366 of file GlwClient.c.

References client_TimerHandler, debug_Begin, debug_End, global_window, glw_ReadMessage, glw_Timer::id, NULL, u32, and glw_Timer::userdata.

Referenced by WinMain.

void glw_TimerCancel u32    window,
u32    id
 

Definition at line 478 of file GlwClient.c.

References debug_Begin, debug_End, global_window, glw_Timer::id, mem_free, NULL, and u32.

u32 glw_TimerStart u32    window,
u32    millisec,
u32    userdata
 

Definition at line 456 of file GlwClient.c.

References debug_Begin, debug_End, global_window, glw_Timer::id, mem_malloc, NULL, u32, and glw_Timer::userdata.

int WINAPI WinMain HINSTANCE    Instance,
HINSTANCE    PreviousInstance,
LPSTR    CommandLine,
int    CommandShow
 

Definition at line 405 of file GlwClient.c.

References client_address, debug_Begin, debug_End, global_window, glw_Client, glw_StdWindowProc, mem_trace_report, net_GetPort, and NULL.


Variable Documentation

int async = 0 [static]
 

Definition at line 49 of file GlwClient.c.

Referenced by glw_MainLoopCli.

char* client_address = client_loopback [static]
 

Definition at line 45 of file GlwClient.c.

Referenced by WinMain.

char client_loopback[] = "127.0.0.1" [static]
 

Definition at line 44 of file GlwClient.c.

struct glw_Event curr_event [static]
 

Definition at line 70 of file GlwClient.c.

struct glw_Connection* global_conn [static]
 

Definition at line 47 of file GlwClient.c.

HWND global_window [static]
 

Definition at line 46 of file GlwClient.c.

Referenced by glw_MainLoopCli, glw_StdWindowProc, glw_TimerCancel, glw_TimerStart, and WinMain.

int quit = 0 [static]
 

Definition at line 48 of file GlwClient.c.

Referenced by glw_CloseApp, and glw_MainLoopCli.


Generated on Tue Jan 7 12:12:14 2003 for THEGUI by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002