[Click] ToSocket question
Mark Huang
mlhuang at CS.Princeton.EDU
Mon Mar 7 17:29:29 EST 2005
> I'm trying to understand why ToSocket is an agnostic type. It seems to
> me that it should behave pretty much like ToDevice.u One big difference
> is that (from my understanding from the source) ToSocket will keep
> pulling packets from the input, no matter whether the socket is
> available to send stuff or not. I found this could block click in
> sendto(). And because it will pull all packets from the input, Queueing
> won't help.
I wrote ToSocket; originally, it was a direct derivative (read: stolen
goods) of ToDevice, which was agnostic, but I fell behind in maintaining
ToSocket and it looks like ToDevice is now l/h. The behavior your
mention should probably be the default, i.e. open a non-blocking socket
and pull packets when the socket becomes available. Patches welcome,
I've been meaning to submit some recent changes I made to it, to Eddie.
> Another question: Did anyone try the UNIX socket before? I had to hack
> the sendto call to send because my Linux complained that the socket is
> connected and won't do the job.
I tested it at one point when I was writing it, but haven't used it in a
long time. Again, patches welcome. I'm a little busy right now, but
should have some time for Click very soon...
> BTW, First week in click, I have to say cool stuff and fun!
If you're using Click on PlanetLab, let me know. All of the elements
I've contributed are directly related to PlanetLab. I'd like to start a
topic on the PlanetLab Wiki to document some of the interesting work
that's going on with Click.
--Mark
More information about the click
mailing list