libevent $ TestConnectionFactory :: SELF
Type of this instance, automatically specialized in every classlibevent $ TestConnectionFactory :: spawn_connection
Create a newConnection
object for buffer_event
libevent :: ConnectionFactory :: accept_connection
Accept a connection onlistener
libevent :: ConnectionFactory :: bind_tcp
Listen on the TCP socket ataddress
:port
for new connections
libevent :: ConnectionFactory :: bind_unix
Listen on a UNIX domain socket for new connectionscore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
libevent :: ConnectionFactory :: event_base
TheNativeEventBase
for the dispatch loop of this factory
libevent :: ConnectionFactory :: event_base=
TheNativeEventBase
for the dispatch loop of this factory
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: output_class_name
Display class name on stdout (debug only).libevent :: ConnectionFactory :: spawn_connection
Create a newConnection
object for buffer_event
class TestConnectionFactory
super ConnectionFactory
redef fun spawn_connection(buf, address)
do
print "[Server] New client: {address}"
var conn = new TestConnection(buf)
print "[Server] Write: Hi"
conn.write "Hi\n"
return conn
end
end
lib/libevent/libevent_test.nit:33,1--45,3