diff options
author | George Hazan <george.hazan@gmail.com> | 2014-07-20 14:54:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-07-20 14:54:37 +0000 |
commit | 91d312baa652df4977bf1195053e28480970e20f (patch) | |
tree | a5d55eda73ccba6dd68f3a8711b4764fe6eb5ac6 /plugins/FavContacts/src/csocket.cpp | |
parent | 5163941eb4fcc1e90dcbda60e0a2496b55d36303 (diff) |
support for the FavContacts's gadget
git-svn-id: http://svn.miranda-ng.org/main/trunk@9891 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FavContacts/src/csocket.cpp')
-rw-r--r-- | plugins/FavContacts/src/csocket.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/plugins/FavContacts/src/csocket.cpp b/plugins/FavContacts/src/csocket.cpp new file mode 100644 index 0000000000..8b31467c61 --- /dev/null +++ b/plugins/FavContacts/src/csocket.cpp @@ -0,0 +1,21 @@ +#include "headers.h"
+
+#include "csocket.h"
+
+int CSocket::Recv(char *buf, int count)
+{
+ return recv(m_socket, buf, count, 0);
+}
+
+int CSocket::Send(char *buf, int count)
+{
+ if (count < 0)
+ count = (int)strlen(buf);
+ return send(m_socket, buf, count, 0);
+}
+
+void CSocket::Close()
+{
+ shutdown(m_socket, SD_BOTH);
+ closesocket(m_socket);
+}
|