Permalink
Browse files

Implemented TCP transport.

  • Loading branch information...
1 parent 907d741 commit a48cf784eee63091ae0c45174b9135be1c5dcc6d @blitz committed Jan 26, 2010
Showing with 19 additions and 0 deletions.
  1. +1 −0 cl-dbus.asd
  2. +18 −0 tcp-transport.lisp
View
@@ -5,6 +5,7 @@
(:file "types" :depends-on ("packages"))
(:file "transport" :depends-on ("packages"))
(:file "unix-transport" :depends-on ("packages" "transport"))
+ (:file "tcp-transport" :depends-on ("packages" "transport"))
(:file "utilities" :depends-on ("packages"))
(:file "cookie-sha1-auth" :depends-on ("packages" "utilities"))
(:file "anonymous-auth" :depends-on ("packages" "utilities"))
View
@@ -0,0 +1,18 @@
+;;; -*- Mode: Lisp -*-
+;;; Copyright (c) 2008 Julian Stecklina
+;;;
+;;; This file is part of CL-DBUS. Look into LICENSE for license terms.
+
+(in-package :blitz.desktop.dbus)
+
+(deftransport tcp (address)
+ (handler-case
+ (let ((host (server-address-value address "host"))
+ (port (parse-integer (server-address-value address "port"))))
+ (iolib.sockets:make-socket
+ :remote-host host
+ :remote-port port))
+ (t (c)
+ (warn "Unable to connect to to dbus via unix transport: ~A" c)
+ nil)))
+;;; EOF

0 comments on commit a48cf78

Please sign in to comment.