diff options
| author | Fritz Elfert <felfert@to.com> | 2000-08-27 23:21:20 +0000 | 
|---|---|---|
| committer | Fritz Elfert <felfert@to.com> | 2000-08-27 23:21:20 +0000 | 
| commit | f1437f9b53cc63a7d40009a1d7c038bb9514e46e (patch) | |
| tree | eb77444abc0f5fe78f7e7914f9f92ca2e3c0baf0 | |
| parent | 4198a3935bca206192a404790a7529c926252e5d (diff) | |
| download | plptools-f1437f9b53cc63a7d40009a1d7c038bb9514e46e.tar.gz plptools-f1437f9b53cc63a7d40009a1d7c038bb9514e46e.tar.bz2 plptools-f1437f9b53cc63a7d40009a1d7c038bb9514e46e.zip  | |
Some small type changes.
| -rw-r--r-- | lib/ppsocket.cc | 14 | ||||
| -rw-r--r-- | lib/ppsocket.h | 14 | 
2 files changed, 14 insertions, 14 deletions
diff --git a/lib/ppsocket.cc b/lib/ppsocket.cc index 060074a..2140cf8 100644 --- a/lib/ppsocket.cc +++ b/lib/ppsocket.cc @@ -287,12 +287,12 @@ getBufferStore(bufferStore & a, bool wait)  		return 0;  	a.init(); -	if (readTimeout((char *) &l, sizeof(l), 0) != sizeof(l)) +	if (readTimeout(&l, sizeof(l), 0) != sizeof(l))  		return -1;  	l = ntohl(l);  	bp = buff = new unsigned char[l];  	while (l > 0) { -		int j = readTimeout((char *) bp, l, 0); +		int j = readTimeout(bp, l, 0);  		if (j == SOCKET_ERROR || j == 0) {  			delete[]buff;  			return -1; @@ -319,7 +319,7 @@ sendBufferStore(const bufferStore & a)  	if (i != sizeof(hl))  		return false;  	while (l > 0) { -		i = writeTimeout(a.getString(sent), l, 0); +		i = writeTimeout((const char *)a.getString(sent), l, 0);  		if (i == SOCKET_ERROR || i == 0)  			return (false);  		sent += i; @@ -333,7 +333,7 @@ sendBufferStore(const bufferStore & a)  }  int ppsocket:: -readEx(char *Data, int cTerm, int MaxLen) +readEx(unsigned char *Data, int cTerm, int MaxLen)  {  	int i, j; @@ -405,7 +405,7 @@ sputc(char c)  int ppsocket::  read(void *Data, size_t Size, size_t NumObj)  { -	int i = readTimeout((char *) Data, Size * NumObj, 0); +	int i = readTimeout(Data, Size * NumObj, 0);  	return (i);  } @@ -441,7 +441,7 @@ send(const char *buf, int len, int flags)  }  int ppsocket:: -readTimeout(char *buf, int len, int flags) +readTimeout(void *buf, int len, int flags)  {  	int i; @@ -450,7 +450,7 @@ readTimeout(char *buf, int len, int flags)  	//*********************************************************  	if (m_Timeout == INFINITE) { -		i =::recv(m_Socket, buf, len, flags); +		i = ::recv(m_Socket, buf, len, flags);  		if (i == SOCKET_ERROR) {  			m_LastError = lastErrorCode(); diff --git a/lib/ppsocket.h b/lib/ppsocket.h index 9b8c4c2..3cd288a 100644 --- a/lib/ppsocket.h +++ b/lib/ppsocket.h @@ -45,7 +45,7 @@ public:    int getBufferStore(bufferStore &a, bool wait = true);    bool sendBufferStore(const bufferStore &a);    int printf(const char* Format, ...); -  int   readEx(char* Data, int cTerm, int MaxLen); +  int   readEx(unsigned char *Data, int cTerm, int MaxLen);    bool  puts(const char* Data);    char sgetc(void);    bool sputc(char c); @@ -53,8 +53,8 @@ public:    virtual int write(const void* Data, size_t Size, size_t NumObj);    int recv(char* buf, int len, int flags);    int send(const char* buf, int len, int flags); -  int readTimeout(char* buf, int len, int flags); -  int writeTimeout(const char* buf, int len, int flags); +  int readTimeout(void * buf, int len, int flags); +  int writeTimeout(const char *buf, int len, int flags);    inline void timeout(DWORD t) { m_Timeout = t; }    inline DWORD timeout(void) { return(m_Timeout); }    bool closeSocket(void); @@ -62,10 +62,10 @@ public:    bool bindInRange(char* Host, int Low, int High, int Retries);    bool linger(bool LingerOn, int LingerTime = 0);    virtual bool createSocket(void); -  bool setPeer(char* Peer, int Port); -  bool getPeer(char* Peer, int MaxLen, int* Port); -  bool setHost(char* Host, int Port); -  bool getHost(char* Host, int MaxLen, int* Port); +  bool setPeer(char *Peer, int Port); +  bool getPeer(char *Peer, int MaxLen, int* Port); +  bool setHost(char *Host, int Port); +  bool getHost(char *Host, int MaxLen, int* Port);    DWORD getLastError(void) { return(m_LastError); }    inline SOCKET socket(void) const { return(m_Socket); }    DWORD  lastErrorCode();  | 
