     
     //PRIVATE PROPERTIES
     
-    private var currentRequestMessages: [SCMessage]!
-    private let port: UInt16
     private var udpSocket: GCDAsyncUdpSocket!
     private var udpSocketTag: Int = 0
     

    func swiftCoapServer(server: SCServer, didSendSeparateResponseMessage: SCMessage, number: Int)
    
    //Tells the delegate that all registered observers for the particular resource will be notified due to a change of its data representation
    func swiffCoapServer(server: SCServer, willUpdatedObserversForResource resource: SCResourceModel)
}



    private lazy var registeredObserverForResource = [SCResourceModel : [(UInt64, NSData, UInt, UInt?)]]() //Token, Address, SequenceNumber, PrefferedBlock2SZX
    private lazy var block1UploadsForEndpoints = [NSData : [(SCResourceModel, UInt, NSData?)]]()
    
    
    //MARK: Internal Methods (allowed to use)
    
    
    //Convenience initializer (failable): Starts server on initialization.
    
    convenience init?(port: UInt16) {
        self.init()
        
        if !start(port: port) {
            return nil //UDP Setup failed
        }
    }
    
    
    //Start server manually, with the given port
    
    func start(port: UInt16 = 5683) -> Bool {
        if udpSocket == nil {
            udpSocket = GCDAsyncUdpSocket(delegate: self, delegateQueue: dispatch_get_main_queue())
            
            var error: NSError?
            if !udpSocket!.bindToPort(port, error: &error) {
                return false
            }
            
            if !udpSocket!.beginReceiving(&error) {
                return false
            }
        }
        
        return true
    }
    
    
    //Close UDP socket and server ativity
    
    func close() {
        udpSocket?.close()
        udpSocket = nil
    }
    
    
    //Reset Context Information
    
    func reset() {
        pendingMessagesForEndpoints = [:]
        registeredObserverForResource = [:]
        block1UploadsForEndpoints = [:]
        resources = []
    }
    
    
    //Call this method when your resource is ready to process a separate response. The concerned resource must return true for the method `willHandleDataAsynchronouslyForGet(...)`. It is necessary to pass the original message and the resource (both received in `willHandleDataAsynchronouslyForGet`) so that the server is able to retrieve the current context. Additionay, you have to pass the typical "values" tuple which form the response (as described in SCMessage -> SCResourceModel)
    
