     func toCType() -> Int32 {
         switch self {
         case .TCP: return Int32(IPPROTO_TCP) //needs manual casting bc Linux
+        case .UDP: return Int32(IPPROTO_UDP)
         }
     }
 }

    func toCType() -> Int32 {
        switch self {
        case .Stream: return Int32(SOCK_STREAM)
        }
    }
}


enum SocketType {
    case Stream
    case Dgram
}

enum Protocol {
    case TCP
    case UDP
}

enum AddressFamily {
