File: package.lisp

package info (click to toggle)
cl-usocket 0.8.8-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,020 kB
  • sloc: lisp: 7,319; makefile: 24
file content (140 lines) | stat: -rw-r--r-- 4,577 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
;;;; -*- Mode: LISP; Base: 10; Syntax: ANSI-Common-lisp; Package: CL-USER -*-
;;;; See the LICENSE file for licensing information.

(defpackage :usocket
  (:use #-genera :common-lisp
        #+genera :future-common-lisp
	#+abcl :java
	:split-sequence)
  (:export   #:*version*
             #:*wildcard-host*
             #:*auto-port*

             #:+max-datagram-packet-size+

             #:socket-connect ; socket constructors and methods
             #:socket-listen
             #:socket-accept
             #:socket-close
             #:socket-shutdown
             #:get-local-address
             #:get-peer-address
             #:get-local-port
             #:get-peer-port
             #:get-local-name
             #:get-peer-name

             #:socket-send    ; udp function (send)
             #:socket-receive ; udp function (receive)

             #:wait-for-input ; waiting for input-ready state (select() like)
             #:make-wait-list
             #:add-waiter
             #:remove-waiter
             #:remove-all-waiters

             #:with-connected-socket ; convenience macros
             #:with-server-socket
             #:with-client-socket
             #:with-socket-listener

             #:usocket ; socket object and accessors
             #:stream-usocket
             #:stream-server-usocket
             #:socket
             #:socket-stream
             #:datagram-usocket
             #:socket-state ; 0.6.4

             ;; predicates (for version 0.6 or 1.0 ?)
             #:usocket-p
             #:stream-usocket-p
             #:stream-server-usocket-p
             #:datagram-usocket-p

             #:host-byte-order ; IPv4 utility functions
             #:hbo-to-dotted-quad
             #:hbo-to-vector-quad
             #:vector-quad-to-dotted-quad
             #:dotted-quad-to-vector-quad

             #:vector-to-ipv6-host ; IPv6 utility functions
             #:ipv6-host-to-vector

             #:ip= ; IPv4+IPv6 utility function
             #:ip/=

             #:integer-to-octet-buffer ; Network utility functions
             #:octet-buffer-to-integer
             #:port-to-octet-buffer
             #:port-from-octet-buffer
             #:ip-to-octet-buffer
             #:ip-from-octet-buffer

             #:with-mapped-conditions

             #:socket-condition ; conditions
             #:ns-condition
             #:socket-error ; errors
             #:ns-error
             #:unknown-condition
             #:ns-unknown-condition
             #:unknown-error
             #:ns-unknown-error
	     #:already-shutdown-error
	     #:out-of-memory-error
             #:socket-warning ; warnings (udp)

             #:insufficient-implementation ; conditions regarding usocket support level
             #:unsupported
             #:unimplemented

             #:socket-server
             #:*remote-host*
             #:*remote-port*

             ;; added in 0.7.1
             #:get-host-by-name
             #:get-hosts-by-name
             #:get-random-host-by-name
             #:ns-host-not-found-error
             #:ns-no-recovery-error
             #:ns-try-again-condition ; obsoleted
             #:ns-try-again-error
             #:default-udp-handler
             #:default-tcp-handler
             #:echo-tcp-handler ;; server handlers

             ;; added in 0.8.0
             #:*backend*
             #:*default-event-base*
             #:host-to-hostname

             ;; socket-related conditions from IOlib
             #:ADDRESS-NOT-AVAILABLE-ERROR #:HOST-DOWN-ERROR
             #:OPERATION-NOT-SUPPORTED-ERROR #:SOCKET-OPTION
             #:NETWORK-DOWN-ERROR #:INVALID-SOCKET-ERROR
             #:SOCKET-TYPE-NOT-SUPPORTED-ERROR #:DEADLINE-TIMEOUT-ERROR
             #:SHUTDOWN-ERROR #:HOST-UNREACHABLE-ERROR
             #:NETWORK-UNREACHABLE-ERROR #:CONNECTION-ABORTED-ERROR
             #:BAD-FILE-DESCRIPTOR-ERROR #:PROTOCOL-NOT-SUPPORTED-ERROR
             #:CONNECTION-RESET-ERROR #:TIMEOUT-ERROR
             #:ADDRESS-IN-USE-ERROR #:NO-BUFFERS-ERROR
             #:INVALID-SOCKET-STREAM-ERROR #:INTERRUPTED-CONDITION
             #:INVALID-ARGUMENT-ERROR #:OPERATION-NOT-PERMITTED-ERROR
             #:NETWORK-RESET-ERROR #:CONNECTION-REFUSED-ERROR

             ;; added in 0.8.2
             #:host-or-ip

	     ;; added in 0.8.4
	     #:*ipv6-only-p*

             ;; restarts of SOCKET-LISTEN (added in 0.8.6)
             #:use-other-host
             #:use-other-port
             #:retry

             ;; added in 0.8.8
             #:get-host-name
             ))