libevent: rename `bind_to` to the more precise `bind_tcp`
authorAlexis Laferrière <alexis.laf@xymus.net>
Wed, 18 Jul 2018 18:20:39 +0000 (14:20 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Thu, 19 Jul 2018 23:13:09 +0000 (19:13 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/libevent/libevent.nit
lib/nitcorn/reactor.nit

index 8d3ec07..ec7d290 100644 (file)
@@ -419,7 +419,7 @@ end
 # A listener acting on an interface and port, spawns `Connection` on new connections
 extern class ConnectionListener `{ struct evconnlistener * `}
 
-       private new bind_to(base: NativeEventBase, address: CString, port: Int, factory: ConnectionFactory)
+       private new bind_tcp(base: NativeEventBase, address: CString, port: Int, factory: ConnectionFactory)
        import ConnectionFactory.accept_connection, error_callback `{
 
                ConnectionFactory_incr_ref(factory);
@@ -514,9 +514,9 @@ class ConnectionFactory
        # Listen on the TCP socket at `address`:`port` for new connections
        #
        # On new connections, libevent callbacks `spawn_connection`.
-       fun bind_to(address: String, port: Int): nullable ConnectionListener
+       fun bind_tcp(address: String, port: Int): nullable ConnectionListener
        do
-               var listener = new ConnectionListener.bind_to(
+               var listener = new ConnectionListener.bind_tcp(
                        event_base, address.to_cstring, port, self)
 
                if listener.address_is_null then
index 85a2068..def3699 100644 (file)
@@ -176,7 +176,7 @@ redef class Sys
 
                var listener = listeners[name, port]
                if listener == null then
-                       listener = factory.bind_to(name, port)
+                       listener = factory.bind_tcp(name, port)
                        if listener != null then
                                sys.listeners[name, port] = listener
                                listeners_count[name, port] = 1