▼ |  | Net: Networking Libraries

1 | HTTP Client
2 | URLs and HTTP
3 | URI Codec: Encoding and Decoding URIs
4 | Web Socket
5 | FTP: Client
6 | Send URL: Opening a Web Browser
7 | SMTP: Sending E-Mail
8 | sendmail: Sending E-Mail
9 | Headers: Parsing and Constructing
10 | IMAP: Reading Mail
11 | POP3: Reading Mail
12 | MIME: Decoding Internet Data
13 | Base 64: Encoding and Decoding
14 | Quoted-Printable: Encoding and Decoding
15 | DNS: Domain Name Service Queries
16 | NNTP: Newsgroup Protocol
17 | TCP: Unit and Signature
18 | TCP Redirect: tcp^ via Channels
19 | SSL Unit: tcp^ via SSL
20 | CGI Scripts
21 | Cookie: HTTP Client Storage
| Bibliography
| Index

On this page:

tcp-redirect

top ← prev up next →

### 18`` TCP Redirect: tcp^ via Channels

(require net/tcp-redirect) | package: net-lib

The net/tcp-redirect library provides a function for directing some TCP port numbers to use buffered channels instead of the TCP support from racket/tcp.

> procedure (tcp-redirect port-numbers) → unit?
> port-numbers : (listof (integer-in 0 65535))

Returns a unit that implements tcp^. For port numbers not listed in port-numbers, the unit’s implementations are the racket/tcp implementations.

For the port numbers listed in port-numbers and for connections to "127.0.0.1", the unit’s implementation does not use TCP connections, but instead uses internal buffered channels. Such channels behave exactly as TCP listeners and ports.

top ← prev up next →