Fixed DevStudio 2003 build with memory check code.
[pwlib.git] / src / ptlib / msos / dossock.cxx
blob5d4f4b4965304b02c9996bb816cb5db8f7d4d502
1 /*
2 * dossock.cxx
4 * MS-DOS imeplmentation of sockets.
6 * Portable Windows Library
8 * Copyright (c) 1993-1998 Equivalence Pty. Ltd.
10 * The contents of this file are subject to the Mozilla Public License
11 * Version 1.0 (the "License"); you may not use this file except in
12 * compliance with the License. You may obtain a copy of the License at
13 * http://www.mozilla.org/MPL/
15 * Software distributed under the License is distributed on an "AS IS"
16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 * the License for the specific language governing rights and limitations
18 * under the License.
20 * The Original Code is Portable Windows Library.
22 * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
24 * Portions are Copyright (C) 1993 Free Software Foundation, Inc.
25 * All Rights Reserved.
27 * Contributor(s): ______________________________________.
29 * $Log$
30 * Revision 1.3 1998/09/24 03:30:42 robertj
31 * Added open software license.
33 * Revision 1.2 1995/02/05 00:53:15 robertj
34 * Commonised out of band stuff.
38 #include <ptlib.h>
39 #include <sockets.h>
42 //////////////////////////////////////////////////////////////////////////////
43 // PSocket
45 PSocket::PSocket()
50 BOOL PSocket::Read(void * buf, PINDEX len)
52 return TRUE;
56 BOOL PSocket::Write(const void * buf, PINDEX len)
58 return TRUE;
62 BOOL PSocket::Close()
64 if (IsOpen())
65 return FALSE;
66 // return ConvertOSError(closesocket(os_handle));
67 return FALSE;
71 BOOL PSocket::ConvertOSError(int error)
73 if (error >= 0) {
74 lastError = NoError;
75 osError = 0;
76 return TRUE;
79 // osError = WSAGetLastError();
80 switch (osError) {
81 case 0 :
82 lastError = NoError;
83 return TRUE;
84 default :
85 lastError = Miscellaneous;
86 osError |= 0x20000000;
88 return FALSE;
92 // End Of File ///////////////////////////////////////////////////////////////