     /// Attempt to accept an incomping connection.
     public func accept() throws -> L2CAPSocket {
         let (clientFileDescriptor, clientAddress) = try fileDescriptor.accept(L2CAPSocketAddress.self)
-        let newSocket = L2CAPSocket(
+        try clientFileDescriptor.closeIfThrows {
+            try clientFileDescriptor.setNonblocking()
+        }
+        return L2CAPSocket(
             fileDescriptor: clientFileDescriptor,
             address: clientAddress
         )
-        return newSocket
     }
     
     /// Reads from the socket.
-    public func recieve(_ bufferSize: Int = 1024) throws -> Data {
+    public func recieve(_ bufferSize: Int = 1024) throws -> Data? {
+        
+        let events = try fileDescriptor.poll(
+            for: [.read],
+            timeout: 0
+        )
+        
+        guard events.contains(.read) else {
+            return nil
+        }
         
         var buffer = Data(repeating: 0, count: bufferSize)
         let recievedByteCount = try buffer.withUnsafeMutableBytes {

import SystemPackage

/// L2CAP Bluetooth socket
public final class L2CAPSocket {
    
    // MARK: - Properties
    
    /// Internal socket file descriptor
    internal let fileDescriptor: FileDescriptor
    
    /// L2CAP Socket address

        )
    }
    
    /// Write to the socket.
    public func send(_ data: Data) throws {
        
