   public func connect(toHost host: String, port: UInt16) throws {
 
     try socketQueue.sync {
-      guard status == .initial || status == .closed else { throw SocketError(.socketErrorIncorrectSocketStatus) }
+      guard socketType == .tcp && (status == .initial || status == .closed) else { throw SocketError(.socketErrorIncorrectSocketStatus) }
       readQueue.removeAll()
       writeQueue.removeAll()
       status = .connecting

  fileprivate var isWriteDispatchSourceSuspended = true
  fileprivate var isAcceptDispatchSourceSuspended = true
  fileprivate var socketQueue = DispatchQueue(label: "io.proximac.socket.queue")
  fileprivate var socketReady = false
  fileprivate var preferV4 = false
  fileprivate var closeCondition: CloseCondition = .none
  fileprivate var status: SocketStatus = .initial

  fileprivate let CTLIOCGINFO: CUnsignedLong = 0xc0644e03
  fileprivate weak var delegate: SwiftDSSocketDelegate?
  fileprivate weak var delegateQueue: DispatchQueue?
  fileprivate var socketType: SocketType = .tcp
  fileprivate var acceptDispatchSource: DispatchSourceRead?
  fileprivate var readDispatchSource: DispatchSourceRead?
