ReactOS 0.4.16-dev-329-g9223134
tnetwork.h
Go to the documentation of this file.
1// This is a simple class to handle socket connections
2// (Paul Brannan 6/15/98)
3
4#pragma once
5
6//#include <windows.h>
7
9
10typedef int(*Naws_func_t)(char *, int, int);
11
12class TNetwork {
13private:
15 BOOL local_echo; // Paul Brannan 8/25/98
16 BOOL line_mode; // Paul Brannan 12/31/98
17 NetworkType net_type; // Paul Brannan 3/18/99
18 HANDLE pipeIn, pipeOut; // Paul Brannan 3/18/99
21
22public:
27
28 void SetSocket(SOCKET s);
30 void SetPipe(HANDLE pIn, HANDLE pOut);
32 void SetLocalAddress(char *buf);
33 const char* GetLocalAddress() {return local_address;}
34
36
37 int WriteString(const char *str, const int length);
38 int ReadString (char *str, const int length);
39
42
45
46 void do_naws(int width, int height);
47};
~TNetwork()
Definition: tnetwork.h:26
TNetwork(SOCKET s=0)
Definition: tnetwork.h:23
int ReadString(char *str, const int length)
Definition: tnetwork.cpp:67
void SetSocket(SOCKET s)
Definition: tnetwork.cpp:40
BOOL get_line_mode()
Definition: tnetwork.h:43
void SetLocalAddress(char *buf)
Definition: tnetwork.cpp:88
NetworkType net_type
Definition: tnetwork.h:17
HANDLE pipeIn
Definition: tnetwork.h:18
HANDLE pipeOut
Definition: tnetwork.h:18
SOCKET GetSocket()
Definition: tnetwork.h:29
void set_line_mode(BOOL b)
Definition: tnetwork.h:44
BOOL local_echo
Definition: tnetwork.h:15
NetworkType get_net_type()
Definition: tnetwork.h:35
Naws_func_t naws_func
Definition: tnetwork.h:19
void set_local_echo(BOOL b)
Definition: tnetwork.h:41
int WriteString(const char *str, const int length)
Definition: tnetwork.cpp:53
SOCKET socket
Definition: tnetwork.h:14
BOOL get_local_echo()
Definition: tnetwork.h:40
const char * GetLocalAddress()
Definition: tnetwork.h:33
void SetPipe(HANDLE pIn, HANDLE pOut)
Definition: tnetwork.cpp:46
void do_naws(int width, int height)
Definition: tnetwork.cpp:81
BOOL line_mode
Definition: tnetwork.h:16
void SetNawsFunc(Naws_func_t func)
Definition: tnetwork.h:31
char * local_address
Definition: tnetwork.h:20
#define NULL
Definition: types.h:112
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
unsigned char
Definition: typeof.h:29
unsigned int BOOL
Definition: ntddk_ex.h:94
GLdouble s
Definition: gl.h:2039
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLenum func
Definition: glext.h:6028
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
#define b
Definition: ke_i.h:79
const WCHAR * str
NetworkType
Definition: tnetwork.h:8
@ TN_NETSOCKET
Definition: tnetwork.h:8
@ TN_NETPIPE
Definition: tnetwork.h:8
int(* Naws_func_t)(char *, int, int)
Definition: tnetwork.h:10
UINT_PTR SOCKET
Definition: winsock.h:47