<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel about="http://permalink.gmane.org/gmane.lisp.cmucl.devel">
    <title>gmane.lisp.cmucl.devel</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10626"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10625"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10624"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10623"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10622"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10621"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10620"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10619"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10618"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10617"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10616"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10615"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10614"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10613"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10612"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10611"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10610"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10609"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10608"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10606"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10626">
    <title>Re: compare networking API on different CLs</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10626</link>
    <description>


  I have no problems with bind-inet-socket and create-inet-socket. I
still don't see the value in adding bind to connect-to-inet-socket.
But the manner in which it has been added won't cause problems for
those who don't care for it. 

  So I vote for it, check the changes in.

  Mike McDonald
  mikemac&lt; at &gt;mikemac.com


</description>
    <dc:creator>Mike McDonald</dc:creator>
    <dc:date>2008-07-24T16:30:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10625">
    <title>Re: compare networking API on different CLs</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10625</link>
    <description>
    Chun&gt; Right, you got it:)

    &gt;&gt; 
    &gt;&gt; 
    &gt;&gt; Although I don't do networking, I have heard usocket is a good socket
    &gt;&gt; library.  Providing the necessary hooks so usocket can do what it
    &gt;&gt; needs to do would be good too.

    Chun&gt; Thank you, very much!

Well, I'd still like to hear other opinions.  :-)

Another option would be to port, say, sb-bsd-sockets.  Or maybe
provide a lower-level interface in addition to the high-level
interface, with the high-level interface using the low-level.

Ray


</description>
    <dc:creator>Raymond Toy (RT/EUS</dc:creator>
    <dc:date>2008-07-24T15:12:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10624">
    <title>Re: compare networking API on different CLs</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10624</link>
    <description>Hi, Raymond

在 2008-7-24，下午9:58， Raymond Toy (RT/EUS) 写道：

Right, you got it:)


Thank you, very much!

Regards,

Chun Tian (binghe)



</description>
    <dc:creator>Chun Tian (binghe</dc:creator>
    <dc:date>2008-07-24T14:37:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10623">
    <title>Re: compare networking API on different CLs</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10623</link>
    <description>
    Chun&gt; 在 2008-7-24，下午7:01， Alex Goncharov 写道：

    Chun&gt; Any "small extension" is to post-design CMUCL API, and why I do this
    Chun&gt; is because CMUCL's networking API is incomplete. I don't know who
    Chun&gt; design it, but if I can talk with this guy, I'll say: "not so good as
    Chun&gt; other parts of CMUCL"

The file says it was written by William Lott.  It probably hasn't
really changed much since it was written in 1992.  (William Lott
appears to have written a lot of the other parts of CMUCL too.)

    &gt;&gt; 
    &gt;&gt; 
    &gt;&gt; I don't use this kind of code and shouldn't be influenced by it.  But
    &gt;&gt; I do care deeply about CMUCL stability, code organization and
    &gt;&gt; philosophy.  Making CMUCL like others is not what I am longing for.

    Chun&gt; I care about CMUCL stability too. If I'm talking about port the whole
    Chun&gt; SB-BSD-SOCKETS package into CMUCL, I'm crasy, now I'm just trying to
    Chun&gt; fix something what last CMUCL designer leave us to do.

    Chun&gt; So, let's see other</description>
    <dc:creator>Raymond Toy (RT/EUS</dc:creator>
    <dc:date>2008-07-24T13:58:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10622">
    <title>Re: compare networking API on different CLs</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10622</link>
    <description>
在 2008-7-24，下午7:01， Alex Goncharov 写道：


Just add a encapsulate bind(2) cannot work with CMUCL's exist API. You  
must bind a socket *before* do other things to it. I think I have  
explained the reason in last post.

I just follow CMUCL's exist API to make my changes.


Any "small extension" is to post-design CMUCL API, and why I do this  
is because CMUCL's networking API is incomplete. I don't know who  
design it, but if I can talk with this guy, I'll say: "not so good as  
other parts of CMUCL"


I care about CMUCL stability too. If I'm talking about port the whole  
SB-BSD-SOCKETS package into CMUCL, I'm crasy, now I'm just trying to  
fix something what last CMUCL designer leave us to do.

So, let's see other post and idea, and let rtoy decide whether or not  
accept it.

Regards,

Chun Tian (binghe)



</description>
    <dc:creator>Chun Tian (binghe</dc:creator>
    <dc:date>2008-07-24T11:18:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10621">
    <title>Re: compare networking API on different CLs</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10621</link>
    <description>,--- You/Chun (Thu, 24 Jul 2008 11:46:43 +0800) ----*
| Yes, I do encapsulate *two* system calls, connect(2) and bind(2), in  
| CREATE-INET-SOCKET, one because there is *no* API in CMUCL which can  
| only do a bind(2)!!! If you do not give CREATE-INET-SOCKET local-host/ 
| local-port argument, the bind(2) will not be called.

So, why not to suggest a simpler patch then -- encapsulating bind(2)
only?

| I have researched the networking API in five CLs (cmucl, sbcl,
| openmcl, allegro, and lispworks) and I must say CMUCL has the most
| poor API here.

| CMUCL's networking API is quiet different from SBCL, but something
| like LispWorks:

It's probably not a bad comparison...

| In SBCL, to do networking, (make-instance 'INET-SOCKET) first, it can  
| be TCP or UDP socket, then you may use SOCKET-BIND to bind it to local  
| port, or use SOCKET-CONNECT to call connect() on this socket. Now you  
| can see the difference: SBCL's SOCKET-CONNECT has argument as socket,  
| not host/port in CMUCL's CONNECT-TO-INE</description>
    <dc:creator>Alex Goncharov</dc:creator>
    <dc:date>2008-07-24T11:01:22</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10620">
    <title>Re: compare networking API on different CLs</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10620</link>
    <description>Hi, Alex

Yes, I do encapsulate *two* system calls, connect(2) and bind(2), in  
CREATE-INET-SOCKET, one because there is *no* API in CMUCL which can  
only do a bind(2)!!! If you do not give CREATE-INET-SOCKET local-host/ 
local-port argument, the bind(2) will not be called.

I have researched the networking API in five CLs (cmucl, sbcl,  
openmcl, allegro, and lispworks) and I must say CMUCL has the most  
poor API here. CMUCL's networking API is quiet different from SBCL,  
but something like LispWorks:

In SBCL, to do networking, (make-instance 'INET-SOCKET) first, it can  
be TCP or UDP socket, then you may use SOCKET-BIND to bind it to local  
port, or use SOCKET-CONNECT to call connect() on this socket. Now you  
can see the difference: SBCL's SOCKET-CONNECT has argument as socket,  
not host/port in CMUCL's CONNECT-TO-INET-SOCKET. This means CMUCL has  
a high-level API than SBCL, but its high-level API lack of necessary  
arguments.

LispWorks' networking API is quite like CMUCL (plus my patch),  
L</description>
    <dc:creator>Chun Tian (binghe</dc:creator>
    <dc:date>2008-07-24T03:46:43</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10619">
    <title>Re: [patch] Networking: bind to local-host/local-port when connect</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10619</link>
    <description>
Ah. Ok. Sorry for the misunderstanding. However, the only 2
implementations which prevent me from implementing this feature cross
platform are CMU and CLISP. All others allow this action. This is one
reason for 'wanting' it.

Bye,

Erik.


</description>
    <dc:creator>Erik Huelsmann</dc:creator>
    <dc:date>2008-07-23T18:34:25</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10618">
    <title>Re: [patch] Networking: bind to local-host/local-port when connect</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10618</link>
    <description>
It's not uncommon for servers to provide this functionality. That way
the admin can limit the accepted input to the 'localhost' interface
for local testing, for example. It's standard functionality in Apache,
for example. I think it's standard in (x)inetd too.

Bye,

Erik.


</description>
    <dc:creator>Erik Huelsmann</dc:creator>
    <dc:date>2008-07-23T18:20:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10617">
    <title>Re: [patch] Networking: bind to local-host/local-port when connect</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10617</link>
    <description>
在 2008-7-24，上午2:40， Mike McDonald 写道：


For client to choose interface, I've said this in last post.




</description>
    <dc:creator>Chun Tian (binghe</dc:creator>
    <dc:date>2008-07-23T18:34:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10616">
    <title>Re: [patch] Networking: bind to local-host/local-port when connect</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10616</link>
    <description>

  I meant in CONNECT-TO-INET-SOCKET. Yes, servers sometimes want to
bind() the socket to a specific interface. I can't figure out why a
client would want to do that.

  Mike McDonald
  mikemac&lt; at &gt;mikemac.com


</description>
    <dc:creator>Mike McDonald</dc:creator>
    <dc:date>2008-07-23T18:40:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10615">
    <title>UDP server+client sample code</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10615</link>
    <description>Hi, CMUCL &amp; rtoy

I wrote a sample code for UDP networking test on CMUCL, based on my  
last patch.

The source code in attach has four parts: Part 1 is my loadable patch  
to CMUCL's local-bind support, Part 2 is the WAIT-FOR-INPUT function  
from USOCKET project, Part 3 is my simple UDP server implementation,  
Part 4 is the UDP client test code.

When running a UDP server, since I didn't use any multiprocessing, I  
must start two CMUCL (19e/darwin) to run test:

On CMUCL A, I run a UDP echo server:

* (compile-file "cmucl-udp-server" :load t)
* (socket-server "localhost" 10000 #'identity)

On CMUCL B, I run the client to test it:

* (compile-file "cmucl-udp-server" :load t)
* (socket-client-test)

Then you should see text output on both side.

CMUCL A: (server)

* (socket-server "localhost" 10000 #'identity)
I got something!
I got 10 bytes from 2130706433:49621, it's #(1 2 3 4 5 6 7 8 9 10).
I'll send this reply: #(1 2 3 4 5 6 7 8 9 10).
10 bytes sent.

CMUCL B: (client)

* (socket-client-test)
I create </description>
    <dc:creator>Chun Tian (binghe</dc:creator>
    <dc:date>2008-07-23T15:34:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10614">
    <title>Re: [patch] Networking: bind to local-host/local-port when connect</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10614</link>
    <description>And another view:

If you have more than one network interface in your machine, and you  
want to send your packets through specific interface, one way is to  
bind your socket to specific local address/port.

Sometimes it's very important to have a way to choose the interface to  
use.

--binghe

在 2008-7-23，下午11:01， Chun Tian (binghe) 写道：




</description>
    <dc:creator>Chun Tian (binghe</dc:creator>
    <dc:date>2008-07-23T15:37:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10613">
    <title>Re: [patch] Networking: bind to local-host/local-port when connect</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10613</link>
    <description>


  Out of curiousity, why would someone want to bind the local host and
port to specific values?

  Mike McDonald
  mikemac&lt; at &gt;mikemac.com


</description>
    <dc:creator>Mike McDonald</dc:creator>
    <dc:date>2008-07-23T14:59:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10612">
    <title>Re: [patch] Networking: bind to local-host/local-port when connect</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10612</link>
    <description>Hi, Mike

I think the biggest function of binding local host/port is to  
implement a UDP server.

I'll show some code in half a hour.

--binghe

在 2008-7-23，下午10:59， Mike McDonald 写道：




</description>
    <dc:creator>Chun Tian (binghe</dc:creator>
    <dc:date>2008-07-23T15:01:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10611">
    <title>Re: [patch] Networking: bind to local-host/local-port when connect</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10611</link>
    <description>Update version of my patch in attach. Better and smaller.

Current I do have a sample usage based on this patch, but it's usocket  
udp extension, and a portable UDP server. If you really want to see a  
pure-CMUCL example (a UDP server working with a UDP client, both in  
CMUCL), just give me some time to write one.

--binghe



在 2008-7-23，下午9:26， Raymond Toy (RT/EUS) 写道：


</description>
    <dc:creator>Chun Tian (binghe</dc:creator>
    <dc:date>2008-07-23T14:40:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10610">
    <title>Re: [patch] Networking: bind to local-host/local-port when connect</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10610</link>
    <description>
    Alex&gt; [ Not sure cmucl-imp&lt; at &gt; will take a message from me -- a few were
    Alex&gt;   not posted in the past.] 

If that is still the case, please let me know.

[snip]

The patch is appended below.

Ray

(in-package :extensions)

(ext:without-package-locks

;;; Added by Chun Tian (binghe)
(defun bind-inet-socket (socket host port)
  "bind a socket to (local) host/port"
  (with-alien ((sockaddr inet-sockaddr))
    (setf (slot sockaddr 'family) af-inet)
    (setf (slot sockaddr 'port) (htons port))
    (setf (slot sockaddr 'addr) (htonl host))
    (when (minusp (unix:unix-bind socket
  (alien-sap sockaddr)
  (alien-size inet-sockaddr :bytes)))
      (let ((errno (unix:unix-errno)))
(unix:unix-close socket)
(error 'socket-error
       :format-control "Error binding socket to port ~A: ~A"
       :format-arguments (list port
       (unix:get-unix-error-msg))
       :errno errno)))))

(defun connect-to-inet-socket (host port &amp;optional (kind :stream)
       &amp;key local-host local-port)
  "The ho</description>
    <dc:creator>Raymond Toy (RT/EUS</dc:creator>
    <dc:date>2008-07-23T13:26:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10609">
    <title>Re: [patch] Networking: bind to local-host/local-port when connect</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10609</link>
    <description>[ Not sure cmucl-imp&lt; at &gt; will take a message from me -- a few were
  not posted in the past.] 

,--- You/Raymond (Wed, 23 Jul 2008 08:51:41 -0400) ----*
| Chun Tian (binghe) wrote:
| &gt; CMUCL's networking API do not have standalone BIND function. And it's 
| &gt; EXT:CONNECT-TO-INET-SOCKET and EXT:CREATE-INET-SOCKET function do not 
| &gt; have any LOCAL-HOST/LOCAL-PORT argument. So a client socket is 
| &gt; IMPOSSIBLE to bind to specific local host/port when CONNECT to remote 
| &gt; address.

This sounds terribly suspicious to me.  I'd like to take a look at the
patch but don't see any relevant message at

   http://news.gmane.org/gmane.lisp.cmucl.devel/

| &gt; I wrote a loadable CMUCL patch, which create a new function
| &gt; BIND-INET-SOCKET, and add LOCAL-HOST, LOCAL-PORT keyword arguments
| &gt; to above two functions to support this feature. I think it's quite
| &gt; safe to merge it in next CMUCL version.

I'd say, "Wait a second..." 

| The patch looks ok, but I'm not really competent to review the
| changes since I never do</description>
    <dc:creator>Alex Goncharov</dc:creator>
    <dc:date>2008-07-23T13:18:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10608">
    <title>Re: [patch] Networking: bind to local-host/local-port when connect</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10608</link>
    <description>
The patch looks ok, but I'm not really competent to review the changes 
since I never do network programming.  Perhaps someone who is knows 
networking can say something.

I do wish the functions didn't both have optional and keyword arguments, 
but the existing interface already does that.  Too bad.

Ray


</description>
    <dc:creator>Raymond Toy (RT/EUS</dc:creator>
    <dc:date>2008-07-23T12:51:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10606">
    <title>Re: fixes for CMU User's Manual</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10606</link>
    <description>
Thanks for the patch.  It will be applied shortly.  I don't know much 
about UDP networking and sendto, recvfrom, and shutdown, so I can't add 
any additional information to the documents.

Ray


</description>
    <dc:creator>Raymond Toy (RT/EUS</dc:creator>
    <dc:date>2008-07-18T16:36:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.lisp.cmucl.devel/10605">
    <title>fixes for CMU User's Manual</title>
    <link>http://permalink.gmane.org/gmane.lisp.cmucl.devel/10605</link>
    <description>Hi, CMUCL / rtoy

Recently I tried UDP networking in CMUCL then found some mistakes in  
CMU User's Manual:

1. Three functions INET-SENDTO, INET-RECVFROM, INET-SHUTDOWN is not  
external symbol of UNIX package but EXTENSIONS.

2. INET-SENDTO should have a ADDR argument.

3. INET-RECVFROM maybe need more document, or I don't know how to get  
receive data from a socket.

Attach is my change to internet.tex, please review it.

Regards,

Chun Tian (binghe)


</description>
    <dc:creator>Chun Tian (binghe</dc:creator>
    <dc:date>2008-07-17T05:53:33</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.lisp.cmucl.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.lisp.cmucl.devel</link>
  </textinput>
</rdf:RDF>
