From 8898ad9b25fca6afe2374d293a981db02a83d7e9 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 31 May 2012 14:46:27 +0000 Subject: Committing the documentation to svn to have it accessible online --- Doc/doxygen/html/_net_sock_8h_source.html | 190 ++++++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 Doc/doxygen/html/_net_sock_8h_source.html (limited to 'Doc/doxygen/html/_net_sock_8h_source.html') diff --git a/Doc/doxygen/html/_net_sock_8h_source.html b/Doc/doxygen/html/_net_sock_8h_source.html new file mode 100644 index 0000000..5214374 --- /dev/null +++ b/Doc/doxygen/html/_net_sock_8h_source.html @@ -0,0 +1,190 @@ + + + + + +Starshatter_Open: D:/SRC/StarshatterSVN/NetEx/NetSock.h Source File + + + + + + + + + + + + + +
+
+ + + + + + +
+
Starshatter_Open +
+
Open source Starshatter engine
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
NetSock.h
+
+
+Go to the documentation of this file.
1 /* Project nGenEx
+
2  Destroyer Studios LLC
+
3  Copyright © 1997-2004. All Rights Reserved.
+
4 
+
5  SUBSYSTEM: NetEx.lib
+
6  FILE: NetSock.h
+
7  AUTHOR: John DiCamillo
+
8 
+
9 
+
10  OVERVIEW
+
11  ========
+
12  Network (IP) Socket
+
13 */
+
14 
+
15 #ifndef NetSock_h
+
16 #define NetSock_h
+
17 
+
18 #include <windows.h>
+
19 #include "NetAddr.h"
+
20 #include "Text.h"
+
21 
+
22 // +-------------------------------------------------------------------+
+
23 
+
24 #define NET_MAX_TIMEOUT 1e9
+
25 
+
26 class NetSock
+
27 {
+
28 public:
+
29  static const char* TYPENAME() { return "NetSock"; }
+
30 
+
31  enum SELECT_TYPE {
+ + +
34  };
+
35 
+
36  NetSock(bool stream=false);
+
37  NetSock(const NetAddr& addr, bool stream=false);
+
38  ~NetSock();
+
39 
+
40  int bind(const NetAddr& addr);
+
41  int connect(const NetAddr& addr);
+
42  int listen(int max_connections=5);
+
43  NetSock* accept(NetAddr* addr=0);
+
44  int available();
+
45  int send(Text msg);
+
46  Text recv();
+
47  int sendto(Text msg, const NetAddr& dest);
+
48  Text recvfrom(NetAddr* a=0);
+ +
50  long seconds=0, long microseconds=0);
+
51 
+
52  int shutdown_input();
+
53  int shutdown_output();
+
54  int set_timeout(int msecs);
+
55  int close();
+
56 
+
57  DWORD max_packet_size() const;
+
58  bool is_stream() const { return stream; }
+
59  bool is_closed() const { return closed; }
+
60  int status() const { return stat; }
+
61 
+
62 private:
+
63  NetSock(SOCKET s, bool stream);
+
64 
+
65  SOCKET s;
+
66  bool stream;
+
67  bool closed;
+
68  int stat;
+
69  int current_timeout;
+
70 };
+
71 
+
72 
+
73 #endif NetSock_h
+
+
+ + + + -- cgit v1.1