[Openmcl-devel] Need advice on porting an application from LW
Marco Antoniotti
marcoxa at cs.nyu.edu
Wed Sep 11 12:28:59 PDT 2002
Hi
I have LW application which communicates with a Java program over a
socket. The CL code acts as the "server".
I need to port this application to OS X.
Note that the LW application makes use the MP package and of the COMM
package (which seems to me to be at a higher level of abstraction than
the OpenMCL socket library).
Given that I do not have much experience with network programming, I
need some advice about how to go ahead and do this in OpenMCL.
The main code I have looks like the following (in LW).
==============================================================================
(defun accept-client-connection (socket-handle)
(let ((socket-stream (make-instance 'comm:socket-stream
:socket socket-handle
:direction :io
:element-type 'base-char
))
)
(setf *sc-visualization-display-socket* socket-stream)
(setf *sc-visualization-server-process*
(mp:process-run-function (format nil "Visualization Server Handler ~D"
socket-handle)
'()
#'visualization-handle-client-request
socket-stream
))
))
(defun start-visualization ()
;; Set up the server.
(comm:start-up-server :function 'accept-client-connection
:service *sc-visualization-display-port*
:process-name "Visualization Display Server 9876")
(setf *sc-visualization-display-server*
(mp:find-process-from-name "Visualization Display Server 9876"))
)
==============================================================================
The function VISUALIZATION-HANDLE-CLIENT-REQUEST simply implements a
loop that reads from the socket.
I'd appreciate any help and suggestions. I know the OpenMCL code is
probably going to be more complex.
Thanks
--
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488
715 Broadway 10th Floor fax +1 - 212 - 995 4122
New York, NY 10003, USA http://bioinformatics.cat.nyu.edu
"Hello New York! We'll do what we can!"
Bill Murray in `Ghostbusters'.
_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel
More information about the Openmcl-devel
mailing list