summaryrefslogtreecommitdiff
path: root/include/m_netlib.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-06 10:33:23 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-06 10:33:23 +0000
commit39955d4f87fbf76691b4fd2cb7e46940608a2a90 (patch)
treee379140f0b58803841d35e66a188285d445be07b /include/m_netlib.h
parentfcdd0326f386b0c4d8f52a75207126830904b323 (diff)
old junk removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@6371 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/m_netlib.h')
-rw-r--r--include/m_netlib.h21
1 files changed, 5 insertions, 16 deletions
diff --git a/include/m_netlib.h b/include/m_netlib.h
index 8343ee6c33..44b67a7124 100644
--- a/include/m_netlib.h
+++ b/include/m_netlib.h
@@ -262,20 +262,6 @@ it shouldnt matter */
typedef void (*NETLIBNEWCONNECTIONPROC_V2)(HANDLE hNewConnection, DWORD dwRemoteIP, void * pExtra);
typedef void (*NETLIBNEWCONNECTIONPROC)(HANDLE hNewConnection, DWORD dwRemoteIP);
-/* This is NETLIBBIND prior to 2004/08/05+, DONT use this anymore unless you want to work
-with older cores, pExtra isnt available on older cores and never will be - for a period of time, the ABI
-for this service was broken and older NETLIBBINDs were not supported, if NULL is returned and the
-argument is good, then tell the user to upgrade to the latest CVS.
-
-The older structure was used til around 2004/08/05 */
-typedef struct {
- int cbSize;
- NETLIBNEWCONNECTIONPROC pfnNewConnection;
- //function to call when there's a new connection. Params are: the
- //new connection, IP of remote machine (host byte order)
- DWORD dwInternalIP; //set on return, host byte order
- WORD wPort; //set on return, host byte order
-} NETLIBBINDOLD;
typedef struct {
int cbSize;
@@ -334,7 +320,7 @@ a hard timeout is reached, this can be anywhere between 30-60 seconds, and it st
this is attempted, clearing sucking - so now you can set a timeout of any value, there is still a hard limit which is
always reached by Windows, If a timeout occurs, or Miranda is exiting then you will get ERROR_TIMEOUT as soon as possible.
*/
-#define NETLIBOPENCONNECTION_V1_SIZE 16 /* old sizeof() is 14 bytes, but there is padding of 2 bytes */
+
struct NETLIBOPENCONNECTION_tag {
int cbSize;
const char *szHost; //can contain the string representation of an IP
@@ -345,6 +331,9 @@ struct NETLIBOPENCONNECTION_tag {
stopped, the remaining timeout value can also be adjusted */
int (*waitcallback) (unsigned int * timeout);
};
+
+#define NETLIBOPENCONNECTION_V1_SIZE offsetof(NETLIBOPENCONNECTION_tag, timeout) /* old sizeof() is 14 bytes, but there is padding of 2 bytes */
+
//typedef struct NETLIBOPENCONNECTION_tag NETLIBOPENCONNECTION; //(above for reasons of forward referencing)
#define MS_NETLIB_OPENCONNECTION "Netlib/OpenConnection"
@@ -389,7 +378,7 @@ typedef struct {
// wParam = (WPARAM)(char*) string to convert
// lParam = (LPARAM)(SOCKADDR_INET*) numeric IP address structure
// Returns 0 on success
-#define MS_NETLIB_STARINGTOADDRESS "Netlib/StringToAddress"
+#define MS_NETLIB_STRINGTOADDRESS "Netlib/StringToAddress"
// Converts numerical representation of IP in SOCKADDR_INET into string representation with IP and port
// IPv4 will be supplied in formats address:port or address