Commit graph

8 commits

Author SHA1 Message Date
Andreas Kling
43a6c70c2a LibCore: Make CTCPServer's local address/port getters return Optionals 2019-11-04 13:07:41 +01:00
Andreas Kling
50d937152a LibCore: Constify CTCPServer's local_address() and local_port() 2019-11-04 12:49:48 +01:00
Conrad Pankoff
fbe8569412 LibCore: Add local_{address,port} functions to CTCPServer 2019-11-04 12:49:15 +01:00
Andreas Kling
d6abfbdc5a LibCore: Remove ObjectPtr in favor of RefPtr
Now that CObject is fully ref-counted, just use RefPtr everywhere! :^)
2019-09-22 00:31:54 +02:00
Andreas Kling
4ea229accd LibCore: Convert CTCPServer to ObjectPtr
Also get rid of the custom CNotifier::create() in favor of construct().
2019-09-21 15:25:08 +02:00
Andreas Kling
4298ba25c3 LibCore: Convert CTCPSocket to ObjectPtr, add construct() helper
The C_OBJECT macro now also inserts a static construct(...) helper into
the class. Now we can make the constructor(s) private and instead call:

    auto socket = CTCPSocket::construct(arguments);

construct() returns an ObjectPtr<T>, which we'll later switch to being
a NonnullRefPtr<T>, once everything else in in place for ref-counting.
2019-09-21 15:25:08 +02:00
Andreas Kling
d1bacb9885 LibCore: Convert CNotifier to ObjectPtr 2019-09-20 15:39:15 +02:00
Conrad Pankoff
ed66f1d6d4 LibCore: Add CTCPServer
This is pretty much a find/replace copy of CLocalServer, and some
modifications to CTCPSocket and CSocketAddress to support it.
2019-08-05 12:53:07 +02:00