Commit Graph
19 Commits
Author SHA1 Message Date
Florent Le Coz d46e7ee8c9 Enable TCP keepalive on sockets 2014-02-08 08:14:24 +01:00
Florent Le Coz eb2a2e75c2 Add missing logger include 2014-02-08 08:14:08 +01:00
Florent Le Coz da85617428 Use strerror and log_error instead of perrror 2014-02-08 07:59:02 +01:00
Florent Le Coz c8b41d5e35 Be verbose about IRC server connection failures, and handle them properly 2014-02-08 07:52:22 +01:00
Florent Le Coz d1c6d64546 Add missing stdexcept includes 2014-01-13 20:19:10 +01:00
Florent Le Coz 7701c90763 Add missing errno.h includes 2014-01-04 02:48:08 +01:00
Florent Le Coz baf03a7e20 Do not throw an exception when recv returns and error, just close the socket 2014-01-04 01:59:36 +01:00
Florent Le Coz aa53276859 Keep a "connected" state in the SocketHandler class 2014-01-04 01:59:35 +01:00
Florent Le Coz 3afb63a650 Shutdown cleanly on SIGINT 2014-01-04 01:59:14 +01:00
Florent Le Coz 983477084c connect() returns a boolean 2013-12-24 14:03:40 +01:00
Florent Le Coz 2ecb637f0c Read a variable number of bytes, 4096 by default 2013-12-23 17:07:43 +01:00
Florent Le Coz a4c845ab6c Use the logger everywhere 2013-12-03 19:15:37 +01:00
Florent Le Coz b72908548d Let the user choose the poller to use through cmake POLLER option
Use ccmake, or cmake -i, or cmake -DPOLLER=EPOLL, for example
2013-11-21 00:35:15 +01:00
Florent Le Coz b569240a55 Use epoll 2013-11-21 00:35:15 +01:00
Florent Le Coz 6a43d350be Add include for perror 2013-11-10 03:08:45 +01:00
Florent Le Coz d834d6ed06 Exit the poller when it handles no connection at all 2013-11-03 17:55:23 +01:00
Florent Le Coz 358b53faef Move the basic socket implementation into the SocketHandler class
(that is, the read/write/connect/etc)
Because this code is actually common for both the IrcClient and
XmppComponent class. These two classes have to implement some higher level
callbacks (parsing the data provided in the buffers, doing stuff when the
connection is done) instead of doing the read/write/connect low level
things.
2013-11-02 23:39:00 +01:00
Florent Le Coz 4027ef8c00 Basic IRC message parsing/sending 2013-11-02 16:04:10 +01:00
Florent Le Coz 7869ef2ace First step of the connection skeleton
Basic connect, socket creating, polling, recving, etc.
2013-11-02 03:19:24 +01:00