diff options
author | Mike Buland <eichlan@xagasoft.com> | 2023-07-28 21:18:56 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2023-07-28 21:18:56 -0700 |
commit | 915005e218b5d00939b548de65ce6354f7acb487 (patch) | |
tree | 2f624a37f86f97cfd61c1995df7e4368b462bcac /src/stable/serversocket.h | |
parent | e43a2cac32cb773994b11a3d964ec4acc372d273 (diff) | |
download | libbu++-915005e218b5d00939b548de65ce6354f7acb487.tar.gz libbu++-915005e218b5d00939b548de65ce6354f7acb487.tar.bz2 libbu++-915005e218b5d00939b548de65ce6354f7acb487.tar.xz libbu++-915005e218b5d00939b548de65ce6354f7acb487.zip |
Completely redesigned Server and Client.
Like, seriously, they're almost completely different.
Diffstat (limited to 'src/stable/serversocket.h')
-rw-r--r-- | src/stable/serversocket.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/stable/serversocket.h b/src/stable/serversocket.h new file mode 100644 index 0000000..cb2591d --- /dev/null +++ b/src/stable/serversocket.h | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2019 Xagasoft, All rights reserved. | ||
3 | * | ||
4 | * This file is part of the libbu++ library and is released under the | ||
5 | * terms of the license contained in the file LICENSE. | ||
6 | */ | ||
7 | |||
8 | #ifndef BU_SERVER_SOCKET_H | ||
9 | #define BU_SERVER_SOCKET_H | ||
10 | |||
11 | #include <stdint.h> | ||
12 | |||
13 | namespace Bu | ||
14 | { | ||
15 | class Socket; | ||
16 | |||
17 | /** | ||
18 | * Abstract representation of a server socket of some kind. Maybe socket | ||
19 | * isn't strictly accurate. This could be a tcp/ip socket, a named | ||
20 | * filesystem based socket, etc. | ||
21 | * | ||
22 | *@ingroup Serving | ||
23 | */ | ||
24 | class ServerSocket | ||
25 | { | ||
26 | public: | ||
27 | ServerSocket(); | ||
28 | virtual ~ServerSocket(); | ||
29 | |||
30 | /** | ||
31 | * Accept a new connection, returning a connected Bu::Socket object. | ||
32 | */ | ||
33 | virtual Bu::Socket *accept( int nTimeoutSec=0, int nTimeoutUSec=0 )=0; | ||
34 | |||
35 | /** | ||
36 | * Provide the contained file descriptor. Return false if there is no | ||
37 | * internal file descriptor as such. If the return value is true, then | ||
38 | * rFdOut will be set to the file descriptor. | ||
39 | */ | ||
40 | virtual bool getFd( int &rFdOut ) const=0; | ||
41 | }; | ||
42 | } | ||
43 | |||
44 | #endif | ||