Changeset 10991 for trunk/j/src/org/armedbear/lisp/socket.lisp
- Timestamp:
- 02/14/06 02:30:42 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/socket.lisp
r7359 r10991 1 1 ;;; socket.lisp 2 2 ;;; 3 ;;; Copyright (C) 2004 Peter Graves4 ;;; $Id: socket.lisp,v 1. 2 2004-08-03 16:47:00piso Exp $3 ;;; Copyright (C) 2004-2006 Peter Graves 4 ;;; $Id: socket.lisp,v 1.3 2006-02-14 02:30:19 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 45 45 (%server-socket-close socket)) 46 46 47 (declaim (inline %socket-address %socket-port)) 48 (defun %socket-address (socket addressName) 49 (java:jcall "getHostAddress" (java:jcall-raw addressName socket))) 50 51 (defun %socket-port (socket portName) 52 (java:jcall portName socket)) 53 54 (defun socket-local-address (socket) 55 "Returns the local address of the given socket as a dotted quad string." 56 (%socket-address socket "getLocalAddress")) 57 58 (defun socket-peer-address (socket) 59 "Returns the peer address of the given socket as a dotted quad string." 60 (%socket-address socket "getInetAddress")) 61 62 (defun socket-local-port (socket) 63 "Returns the local port number of the given socket." 64 (%socket-port socket "getLocalPort")) 65 66 (defun socket-peer-port (socket) 67 "Returns the peer port number of the given socket." 68 (%socket-port socket "getPort")) 69 47 70 (provide '#:socket)
Note: See TracChangeset
for help on using the changeset viewer.