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


enum SocketType {
    case Stream
}

enum Protocol {
    case TCP
}

enum AddressFamily {

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