Skip to content
Browse files

modify

  • Loading branch information...
1 parent 2d58e9a commit 41163a4219f41abf73079f8c196f4e3660c83595 yayanyang committed Sep 11, 2012
Showing with 4 additions and 19 deletions.
  1. +0 −15 io/posix/socket.cpp
  2. +4 −4 io/posix/socket.hpp
View
15 io/posix/socket.cpp
@@ -13,21 +13,6 @@ namespace lemon{namespace io{
:BaseType(service),_handle(handle),_af(af),_type(type),_protocol(protocol)
{}
- Socket::Socket(int af, int type, int protocol,IOService * service)
- :BaseType(service),_af(af),_type(type),_protocol(protocol)
- {
- _handle = socket( af, type , protocol );
-
- if(-1 == _handle)
- {
- scope_error_info errorCode;
-
- LEMON_POSIX_ERROR(errorCode,errno);
- }
-
- service->Bind(_handle);
- }
-
Socket::~Socket()
{
::close(_handle);
View
8 io/posix/socket.hpp
@@ -10,7 +10,7 @@
#define LEMON_IO_POSIX_SOCKET_HPP
#include <lemon/io/object.hpp>
-#ifndef LEMON_IO_IOCP
+#ifndef WIN32
#ifdef LEMON_IO_EPOLL
#include <lemon/io/epoll/epoll.hpp>
@@ -23,10 +23,10 @@ namespace lemon{namespace io{
{
public:
typedef ObjectT<Socket,IOService> BaseType;
-
- Socket(int af, int type, int protocol,int handle,IOService * service);
Socket(int af, int type, int protocol,IOService * service);
+
+ Socket(int af, int type, int protocol,int handle,IOService * service);
~Socket();
@@ -84,7 +84,7 @@ namespace lemon{namespace io{
}}
-#endif //#ifndef LEMON_IO_IOCP
+#endif //WIN32
#endif //LEMON_IO_POSIX_SOCKET_HPP

0 comments on commit 41163a4

Please sign in to comment.
Something went wrong with that request. Please try again.