GNet TODO

GNet TODO
---------

Below are features we are interested in adding.  Please see HACKING if
you can help.


Features
--------

- Move udp_mcast_ttl to mcast?

- URL cleanup.  Need to sync with RFC.

- SOCK5 interface support.  (Marius <marius@umich.edu> is
    interested)

- Put include files in gnet-MAJOR.MINOR so multiple development
    packages can be installed.

- Support IPv6.  

    Someone with an IPv6 system needs to do this and test it.  I don't
    want to just use IPv6 structures and claim it's IPv6 compliant.

- Include more protocols

    The goal here is to add basic implementations of popular file
    transfer protocols (eg, HTTP, FTP).  Just the basics - nothing
    fancy.

    I'm hesitant to include more complex protocols (eg, NNTP, SMTP,
    IRC) because they are more application-focused and have limited
    use outside their specific application.  For example, someone who
    wants NNTP is probably implementing a new reader and would be
    better off implementing it from scratch for finer control
    of the protocol.  On the other hand, if someone had a good
    implementation of NNTP with a good interface and there were demand
    for it, I would probably accept it.  (An alternative would be
    start a gnet-protocol library which would include more complex
    protocols).

    I would also be more inclined to accept implementations that are
    in existing, working programs as opposed to from-scratch
    implementations (for complex protocols).  This is because existing
    implementations have been tested both in functionality and in
    interface design.  Moreover, we would be guaranteed at least one
    user.

- Bindings for other languages

    The GTK doc folks are working on a new standard for describing
    interfaces.  Use this when it's done.

- Add gnet_tcp_socket_sendfile(TcpSocket*, GIOChannel).  sendfile is
    available on Linux and Windows, but I'm sure the semantics are
    different (that's why having this function would be handy).

- Consider adding gnet_io_channel_{readv/writev}.  Stevens says this
    isn't Posix (yet?) - check how available it is.  We can always
    fake it if we don't have it.



Internal Improvements
---------------------

- Better asynchronous DNS
    * Use pthread's instead of fork where available (or better,
  the new Glib 1.4 threads where available)
    * Add option to use GNU ADNS? (and update license)
    * Consider modifying glibc/BIND code?

- gnet_inetaddr_new will give you localhost if you give it an hostname
    of "" in Linux.  Is this true on all systems?  If not, we should
    do a return-on-fail when we get an empty string.

- Use getnameinfo when available (for IPv6?)



Other
-----

- More documentation and examples

    Add a beginners guide/tutorial.  Show more code examples.

- Clean up Debian packages.  Add a Debian docs package?

    The packages seem alright, though I'd like someone with more
    Debian experience to double check them.



Undecided (things discussed, but not decided on)
---------

- Add more error types

- Fix gnet_udp_socket_get_MTU on Solaris (If there's a demand for it)

- Clean up GIOChannel usage.  

    Seeking on a socket should raise an error.  Reading/writing to a
    UDP socket should raise an error.  Etc.

    We'd also like to support UDP/Mcast better.  We use a channel for
    a UDP socket, though it's not really a channel.  One solution
    would be to add a GIOMessageSource which supports descrete
    messages and has all the functions GIOChannel has.  Another
    solution is to add a send_msg and recv_msg function to GIOChannel
    (or replace the vtable in GIOChannel with one that also includes
    these functions).

- Differentiate between creating and connecting.  

    So you'd have:

    tcp_socket_new(void)            (this just calls socket())
    tcp_socket_connect(InetAddr*)   (this calls bind(), connect())

    The advantage is that we could set options and also allow the user
    to bind to a specific address if the user is on a multi-homed
    system.  

    Or, add tcp_socket_new_bind() and have tcp_socket_new call it.
    You shouldn't have to bind a connecting socket, so this may not be
    needed.  (Well, sometimes you do for UDP.)

    GConn does this to an extent, so it may not be necessary.

- Support out-of-band data.  How useful is this?  How portable?

- Add lightweight intraprocess communication stuff via IOChannel.  I'd
    like a shared buffer and a message queue.  These should be simple
    to do.  (GLib 1.4/2.0 might have some of this?)


Never (things that will probably never become part of GNet)
-----

- Raw or low-level IP (use libpcap, libnet)