summaryrefslogtreecommitdiff
path: root/plugins/FavContacts/src/csocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/FavContacts/src/csocket.cpp')
-rw-r--r--plugins/FavContacts/src/csocket.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/FavContacts/src/csocket.cpp b/plugins/FavContacts/src/csocket.cpp
new file mode 100644
index 0000000000..dfff16fbf1
--- /dev/null
+++ b/plugins/FavContacts/src/csocket.cpp
@@ -0,0 +1,22 @@
+#include <winsock2.h>
+#include <windows.h>
+#include <ws2tcpip.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 = strlen(buf);
+ return send(m_socket, buf, count, 0);
+}
+
+void CSocket::Close()
+{
+ shutdown(m_socket, SD_BOTH);
+ closesocket(m_socket);
+}