OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | |
2 // for details. All rights reserved. Use of this source code is governed by a | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 #if !defined(DART_IO_DISABLED) | |
6 | |
7 #include "platform/globals.h" | |
8 #if defined(HOST_OS_WINDOWS) | |
9 | |
10 #include "bin/sync_socket.h" | |
11 | |
12 #include "bin/builtin.h" | |
13 #include "bin/log.h" | |
14 #include "bin/utils.h" | |
15 #include "bin/utils_win.h" | |
16 | |
17 // #define SOCKET_LOG_ERROR 1 | |
18 | |
19 // define SOCKET_LOG_ERROR to get log messages only for errors. | |
20 #if defined(SOCKET_LOG_ERROR) | |
bkonyi
2017/04/12 17:26:58
I'm not sure if this is what we want to do here, b
| |
21 #define LOG_ERR(msg, ...) \ | |
22 { \ | |
23 int err = errno; \ | |
24 Log::PrintErr("Dart Socket ERROR: %s:%d: " msg, __FILE__, __LINE__, \ | |
25 ##__VA_ARGS__); \ | |
26 errno = err; \ | |
27 } | |
28 #else | |
29 #define LOG_ERR(msg, ...) | |
30 #endif // defined(SOCKET_LOG_ERROR) | |
31 | |
32 namespace dart { | |
33 namespace bin { | |
34 | |
35 SynchronousSocket::SynchronousSocket(intptr_t fd) { | |
36 LOG_ERR("SynchronousSocket is unimplemented\n"); | |
37 UNIMPLEMENTED(); | |
38 } | |
39 | |
40 | |
41 bool SynchronousSocket::Initialize() { | |
42 LOG_ERR("SynchronousSocket::Initialize is unimplemented\n"); | |
43 UNIMPLEMENTED(); | |
44 return false; | |
45 } | |
46 | |
47 | |
48 void SynchronousSocket::SetClosedFd() { | |
49 LOG_ERR("SynchronousSocket::SetClosedFd is unimplemented\n"); | |
50 UNIMPLEMENTED(); | |
51 } | |
52 | |
53 | |
54 intptr_t SynchronousSocket::CreateConnect(const RawAddr& addr) { | |
55 LOG_ERR("SynchronousSocket::CreateConnect is unimplemented\n"); | |
56 UNIMPLEMENTED(); | |
57 return -1; | |
58 } | |
59 | |
60 | |
61 void SynchronousSocket::ShutdownRead(intptr_t fd) { | |
62 LOG_ERR("SynchronousSocket::ShutdownRead is unimplemented\n"); | |
63 UNIMPLEMENTED(); | |
64 } | |
65 | |
66 | |
67 void SynchronousSocket::ShutdownWrite(intptr_t fd) { | |
68 LOG_ERR("SynchronousSocket::ShutdownWrite is unimplemented\n"); | |
69 UNIMPLEMENTED(); | |
70 } | |
71 | |
72 | |
73 } // namespace bin | |
74 } // namespace dart | |
75 | |
76 #endif // defined(HOST_OS_WINDOWS) | |
77 | |
78 #endif // !defined(DART_IO_DISABLED) | |
OLD | NEW |