libUTL++
LocalServerSocket.h
1 #pragma once
2 
4 
5 #include <libutl/FDstream.h>
6 #include <libutl/ServerSocket.h>
7 #include <libutl/String.h>
8 
10 
11 UTL_NS_BEGIN;
12 
14 
22 
25 {
29 
30 public:
36  LocalServerSocket(const String& path, int backlog = -1);
37 
38  virtual FDstream* makeSocket() const;
39 
46  virtual bool accept(FDstream* socket, InetHostAddress* clientAddr = nullptr);
47 
53  void open(const String& path, int backlog = -1);
54 
56  void setNonBlocking();
57 
58 private:
59  String _path;
60 };
61 
63 
64 UTL_NS_END;
#define UTL_CLASS_DEFID
Default init() and deInit() (which are merely place-holders).
Definition: macros.h:532
#define UTL_CLASS_DECL(DC, BC)
Declaration of standard UTL++ functionality for a non-template class.
Definition: macros.h:688
Character string.
Definition: String.h:31
Local host server socket.
Definition: ServerSocket.h:24
Local host server socket.
#define UTL_CLASS_NO_COPY
Declare that a class cannot do copy().
Definition: macros.h:358
Stream with file descriptor.
Definition: FDstream.h:35
Internet host address.