From: David G. <dav...@po...> - 2008-12-07 23:57:57
|
Alexandre Ferrieux wrote: > What I was dreaming of was taking whatever API exists for USB and > disguising it into a Tcl channel type. > (From what you wrote I believed you were about to do the same for > Bluetooth and IrDA; knowing nothing about them I assumed the three > were one the same level, exposing via specific APIs a point-to-point > packet transfer.) Oh, what's really neet is that IrDA and Bluetooth *do* have a sockets interface. What you want is another basis of driving I/O for a new channel driver type. Probably file based. The list of available protocols for sockets is sizable actually. Here goes the list of what the socket() command _might_ understand. This is of course dependent on OS and what software drivers to support hardware are installed. On win, they're called layered service providers. a general name | address family | type | protocol ------------------------------------------------------------- tcp4 AF_INET SOCK_STREAM IPPROTO_TCP tcp6 AF_INET6 SOCK_STREAM IPPROTO_TCP udp4 AF_INET SOCK_DGRAM IPPROTO_UDP udp6 AF_INET6 SOCK_DGRAM IPPROTO_UDP irda AF_IRDA SOCK_STREAM 0 bluetooth AF_BTH SOCK_STREAM BTHPROTO_RFCOMM appletalk AF_APPLETALK SOCK_STREAM ATPROTO_ATP atm AF_ATM SOCK_STREAM ATMPROTO_AAL5 decnet AF_DECnet SOCK_SEQPACKET DNPROTO_NSP ipx AF_IPX SOCK_DGRAM NSPROTO_IPX spx_seq AF_IPX SOCK_SEQPACKET NSPROTO_SPX spx AF_IPX SOCK_STREAM NSPROTO_SPX spx2_seq AF_IPX SOCK_SEQPACKET NSPROTO_SPXII spx2 AF_IPX SOCK_STREAM NSPROTO_SPXII isotp4 AF_ISO SOCK_STREAM ISOPROTO_TP0 netbios AF_NETBIOS SOCK_DGRAM IPPROTO_UDP vines AF_BAN SOCK_STREAM 0 This isn't an exhaustive list either, but is all the easily available info I have. The non-stream protocols are the tough ones to use with Tcl for the stream-only limitation of channels. But I was just gabbing with Pat Thoyts and I have an idea worth try to use channels for their associate data, but bypass the buffer space altogether and use a different [read] procedure such as [recvfrom] which unloads "packets" from a linkedlist I'd keep in the associate data. |