]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/gsockmsw.h
documented the wxDCBrushChanger, wxDCPenChanger, wxDCTextColourChanger; introduced...
[wxWidgets.git] / include / wx / msw / gsockmsw.h
CommitLineData
904ec517 1/* -------------------------------------------------------------------------
99d80019
JS
2 * Project: GSocket (Generic Socket) for WX
3 * Name: gsockmsw.h
4 * Copyright: (c) Guilhem Lavaux
5 * Licence: wxWindows Licence
6 * Purpose: GSocket MSW header
7 * CVSID: $Id$
904ec517
GRG
8 * -------------------------------------------------------------------------
9 */
10
2804f77d
VZ
11#ifndef _WX_MSW_GSOCKMSW_H_
12#define _WX_MSW_GSOCKMSW_H_
904ec517 13
4b4d23c7 14#include "wx/msw/wrapwin.h"
c21b68f7 15
9e07d399
RN
16#if defined(__CYGWIN__)
17 //CYGWIN gives annoying warning about runtime stuff if we don't do this
18# define USE_SYS_TYPES_FD_SET
19# include <sys/types.h>
20#endif
21
22#if defined(__WXWINCE__) || defined(__CYGWIN__)
dbfb61b3
JS
23#include <winsock.h>
24#endif
25
904ec517 26/* Definition of GSocket */
f0db5d75 27class GSocket : public GSocketBase
904ec517 28{
4b4d23c7 29public:
8e1b8897 30 GSocket(wxSocketBase& wxsocket)
53a161e1
VZ
31 : GSocketBase(wxsocket)
32 {
33 m_msgnumber = 0;
34 }
35
53a161e1 36 virtual GSocket *WaitConnection(wxSocketBase& wxsocket);
eb97543d 37
eb97543d 38
4b4d23c7 39 GSocketError SetServer();
53a161e1 40
2804f77d
VZ
41 // not used under MSW
42 void Notify(bool) { }
948c96ef 43 bool SetReusable();
60edcf45
VZ
44 bool SetBroadcast();
45 bool DontDoBind();
4b4d23c7
DE
46 GSocketError Connect(GSocketStream stream);
47 GSocketError SetNonOriented();
48 int Read(char *buffer, int size);
49 int Write(const char *buffer, int size);
4b4d23c7 50 void SetNonBlocking(bool non_block);
a4506848 51 GSocketError WXDLLIMPEXP_NET GetError();
4b4d23c7
DE
52 GSocketError GetSockOpt(int level, int optname,
53 void *optval, int *optlen);
54 GSocketError SetSockOpt(int level, int optname,
55 const void *optval, int optlen);
8c029a5b 56
4b4d23c7
DE
57protected:
58 GSocketError Input_Timeout();
59 GSocketError Output_Timeout();
60 GSocketError Connect_Timeout();
61 int Recv_Stream(char *buffer, int size);
62 int Recv_Dgram(char *buffer, int size);
63 int Send_Stream(const char *buffer, int size);
64 int Send_Dgram(const char *buffer, int size);
4b4d23c7
DE
65
66/* TODO: Make these protected */
67public:
904ec517 68
904ec517
GRG
69 int m_msgnumber;
70};
71
2804f77d 72#endif /* _WX_MSW_GSOCKMSW_H_ */